This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am trying to invoke the Axis2 sample Stock Quote service from within a BPEL. The WSDL has a SOAP action "urn:getPrice": <wsdl:operation name="getPrice"> <soap:operation soapAction="urn:getPrice" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> An invalid SOAP request is generated which result in an Axis2 error. The SOAP Request that is incorrectly generated by NetBeans is as follows: <?xml version='1.0' encoding='utf-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <To xmlns="http://www.w3.org/2005/08/addressing">http://192.168.110.50:8081/axis2/services/StockQuoteService.StockQuoteServiceHttpSoap11Endpoint/</To> <Action xmlns="http://www.w3.org/2005/08/addressing">"urn:getPrice"</Action> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> </ReplyTo> <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:e55b555e-e6eb-4c2a-874f-1908627f7134</MessageID> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:getPrice xmlns:ns1="http://quickstart.samples/xsd" xmlns:msgns="http://quickstart.samples/"> <ns1:symbol>AAPL</ns1:symbol> </ns1:getPrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The problem can be seen at the line: <Action xmlns="http://www.w3.org/2005/08/addressing">"urn:getPrice"</Action> The action value is surrounded with double quotes, which causes the problem. I had originally filed the issue with Axis2, but it's a NetBeans problem. https://issues.apache.org/jira/browse/AXIS2-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
Please provide the detailed steps and project to reproduce the issue. Regarding to the WS-I specification http://www.ws-i.org/Profiles/BasicProfile-1.1.html#SOAPAction_HTTP_Header It is not forbidden to use double quotes and more over it increases interoperability.
Murali, any comments ?
It is fine to use quotes in the WSDL; however the error is not in the WSDL but in the generated SOAP Request. There are quotes there which cause the problem.
Kini, would you please look at this problem ?
Can you explain how the soap request is generated? Is it generated by the test case on composite app in netbeans or some other way? Or is this generated by bpel during the invoke? If by bpel, then its a runtime issue. If from test case, then the test case soap message generator issue. ccing respective owners Murali and Jun.
The SOAP request is not generated by the test case; the test case has a SOAP request which corresponds to the message required by the BPEL process's input. But the invocation of the Stock Quote service is inside the BPEL process so I believe it gets generated by the BPEL runtime.
can you attach the WSDL for the axis web-service , note the wsdl may not be enabling the ws-addressing by default, If the above is true, then possibly you are using a older version of httpbc, this behavior is changed in the later build of httpbc, can you please update to the latest builds of httpbc
I am using NetBeans 6.5 RC2 with GlassFish V2 UR2: Product Version: NetBeans IDE 6.5 RC2 (Build 200810270001) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\ahumphreys\.netbeans\6.5rc2 The WSDL for the Stock Quote service is: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://quickstart.samples/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://quickstart.samples/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://quickstart.samples/"> <wsdl:documentation>StockQuoteService</wsdl:documentation> <wsdl:types> <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://quickstart.samples/xsd"> <xs:element name="getPrice"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="getPriceResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:double"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="update"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="price" type="xs:double"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="getPriceRequest"> <wsdl:part name="parameters" element="ns:getPrice"/> </wsdl:message> <wsdl:message name="getPriceResponse"> <wsdl:part name="parameters" element="ns:getPriceResponse"/> </wsdl:message> <wsdl:message name="updateRequest"> <wsdl:part name="parameters" element="ns:update"/> </wsdl:message> <wsdl:portType name="StockQuoteServicePortType"> <wsdl:operation name="getPrice"> <wsdl:input message="axis2:getPriceRequest" wsaw:Action="urn:getPrice"/> <wsdl:output message="axis2:getPriceResponse" wsaw:Action="urn:getPriceResponse"/> </wsdl:operation> <wsdl:operation name="update"> <wsdl:input message="axis2:updateRequest" wsaw:Action="urn:update"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="StockQuoteServiceSoap11Binding" type="axis2:StockQuoteServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="getPrice"> <soap:operation soapAction="urn:getPrice" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="update"> <soap:operation soapAction="urn:update" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:binding name="StockQuoteServiceSoap12Binding" type="axis2:StockQuoteServicePortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="getPrice"> <soap12:operation soapAction="urn:getPrice" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> <wsdl:output> <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="update"> <soap12:operation soapAction="urn:update" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:binding name="StockQuoteServiceHttpBinding" type="axis2:StockQuoteServicePortType"> <http:binding verb="POST"/> <wsdl:operation name="getPrice"> <http:operation location="StockQuoteService/getPrice"/> <wsdl:input> <mime:content type="text/xml" part="getPrice"/> </wsdl:input> <wsdl:output> <mime:content type="text/xml" part="getPrice"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="update"> <http:operation location="StockQuoteService/update"/> <wsdl:input> <mime:content type="text/xml" part="update"/> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:service name="StockQuoteService"> <wsdl:port name="StockQuoteServiceHttpSoap11Endpoint" binding="axis2:StockQuoteServiceSoap11Binding"> <soap:address location="http://192.168.110.50:8081/axis2/services/StockQuoteService.StockQuoteServiceHttpSoap11Endpoint/"/> </wsdl:port> <wsdl:port name="StockQuoteServiceHttpSoap12Endpoint" binding="axis2:StockQuoteServiceSoap12Binding"> <soap12:address location="http://192.168.110.50:8081/axis2/services/StockQuoteService.StockQuoteServiceHttpSoap12Endpoint/"/> </wsdl:port> <wsdl:port name="StockQuoteServiceHttpEndpoint" binding="axis2:StockQuoteServiceHttpBinding"> <http:address location="http://192.168.110.50:8081/axis2/services/StockQuoteService.StockQuoteServiceHttpEndpoint/"/> </wsdl:port> </wsdl:service> </wsdl:definitions> Note that I had to comment out the HTTP and SOAP12 bindings to make it work in NetBeans (only using SOAP11 binding) because it was complaining of multiple bindings.
Ok ws-addressing is enabled , though the spec mention the following The inclusion of wsaw:Action without inclusion of wsaw:UsingAddressing has no normative intent and is only informational. In other words, the inclusion of wsaw:Action attributes in WSDL alone does not imply a requirement on clients to use Message Addressing Properties in messages it sends to the service. A client, however, MAY include Message Addressing Properties in the messages it sends, either on its own initiative or as described by other elements of the service contract, regardless of the presence or absence of wsaw:UsingAddressing. Other specifications defining the value of [action] are under no constraint to be consistent with wsaw:Action However in this case the client is sending the ws-addressing headers as expected, though the issue may be elsewhere, Is is possible for us to access the axis webservice you are running so we can test using composite app, also please attach the log which you see the server side and the client side
I think the issue is quite clear. Somehow, the BPEL runtime extracts the SOAP action from the WSDL, and uses it to generate the SOAP request. However, it puts double quotes around the value of the action in the SOAP request, as already mentioned: <Action xmlns="http://www.w3.org/2005/08/addressing">"urn:getPrice"</Action> Instead it should be: <Action xmlns="http://www.w3.org/2005/08/addressing">urn:getPrice</Action> So it seems to me, the bug is in the code that generates the SOAP request; that code, for some reason, puts double quotes around the SOAP action, when it shouldn't, and Axis2 chokes on this request. I am behind a company firewall, so it's not possible to access this web service from outside. However, I am using the sample Stock Quote service that comes with Axis2, so it should be easy for you to run this service. You then will need to create a BPEL than invokes this service, and run the BPEL. That's all there is to it. Note that when I call this web service directly (not from within BPEL), there is no problem. It's a problem with the BPEL runtime that generates an incorrect SOAP request.
I just test a application locally using the following bpel----->httpbc------>javaeeWS ( uses jaxws) , the scenario works fines , <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <To xmlns="http://www.w3.org/2005/08/addressing">http://sbiswas-tecra.stc.com:8080/TestWSAddressing/WSAddressingService</To> <Action xmlns="http://www.w3.org/2005/08/addressing">http://sun.com/WSAddressing/testAddressingRequest</Action> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> </ReplyTo> <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:4a31ff4e-48cc-4a1c-98f6-e6362828d8ea</MessageID> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:testAddressing xmlns:msgns="http://sun.com/" xmlns:ns1="http://sun.com/"> <parameter>Jondoe</parameter> </ns1:testAddressing> </SOAP-ENV:Body> </SOAP-ENV:Envelope> In this case the action header really does not create any content using quote, for some reason it does while invoking the axis webservice, I will take a further look at this
its seems you are running an older version of httpbc, if the given wsdl is modified a bit to explicitly enable the ws-addressing the following will be send by client/httpbc <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <To xmlns="http://www.w3.org/2005/08/addressing">http://sbiswas-tecra.stc.com:8080/TestWSAddressing/StockQuoteService</To> <Action xmlns="http://www.w3.org/2005/08/addressing">urn:getPrice</Action> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> </ReplyTo> <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:ddea818d-2262-4c9a-b560-f046883d0952</MessageID> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:getPrice xmlns:msgns="http://quickstart.samples/" xmlns:ns1="http://quickstart.samples/xsd"> <ns1:symbol>JAVA</ns1:symbol> </ns1:getPrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> take a note at the action <Action xmlns="http://www.w3.org/2005/08/addressing">urn:getPrice</Action> however if the original wsdl is taken , jax-ws/httpbc is not sending any ws-addressing headers, this could based on , part of the specification mentioned before, So it seems that you are using the older version of the httpbc, Can you please update the httpbc component and check that the issue is resolved
I am using NetBeans 6.5 RC2 and GlassFish V2 UR2. httpbc is a component of what? Sorry, but I am not sure how to: 1. Find out my current version of httpbc 2. Upgrade to a newer version of httpbc Can you please tell me how to do the above?
In NB 6.5 RC2 the runtime (e.g. BPEL SE and HTTP BC) is the same as it was in NB 6.1. Looks like problem in HTTP BC was resolved comparatively recently. And fix for this problem is not in NB 6.5 RC2. You can try GF ESB release which contains latest runtime.
I downloaded GlassFish ESB Milestone 2 (Stable), as suggested. This creates a valid SOAP request: <?xml version='1.0' encoding='utf-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <ns1:getPrice xmlns:ns1="http://quickstart.samples/xsd" xmlns:msgns="http://quickstart.samples/"> <ns1:symbol>AAPL</ns1:symbol> </ns1:getPrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The Stock Quote service now runs from BEPL without problems. However, I am wondering why the SOAP Action no longer appears in the generated SOAP request.
right the ws-addressing headers won't appear for the given wsdl, I pasted part of the specification which say this can be a expected behavior, only if the wsdl is modified and ws-addressing in enable explicitly then only you can observe the ws-addressing headers being sent from the jax-ws runtime , please see the previous note which says about the same
Ok, thanks. Can you please tell me how to modify the WSDL to enable ws-addressing? Or provide a reference; this would be greatly appreciated.
note very sure how this is done in axis, usually one can use annotation for this @javax.xml.ws.soap.Addressing @javax.jws.WebService public class AddNumbersImpl { ... } see jax-ws documentation on this https://jax-ws.dev.java.net/jax-ws-21-ea3/docs/wsaddressing.html the wsdl looks like the following <ns1:Policy xmlns:ns1="http://www.w3.org/ns/ws-policy" wsu:Id="WSAddressingPortBinding_Addressing_Policy"> <ns1:ExactlyOne> <ns1:All> <wsaw:UsingAddressing /> </ns1:All> </ns1:ExactlyOne> </ns1:Policy> <binding name="WSAddressingPortBinding" type="tns:WSAddressing"> <wsaw:UsingAddressing /> <ns2:PolicyReference xmlns:ns2="http://www.w3.org/ns/ws-policy" URI="#WSAddressingPortBinding_Addressing_Policy" />
This issue is now marked as fixed, and the target milestone is marked as "Sierra". Could you please tell us which version of NetBeans is Sierra?