Issue Details (XML | Word | Printable)

Key: CXF-602
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jervis Liu
Reporter: Dan Diephouse
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
CXF

EBay WSDL does not work

Created: 25/Apr/07 06:53 PM   Updated: 29/Aug/07 02:03 AM
Return to search
Component/s: None
Affects Version/s: 2.0-RC
Fix Version/s: 2.0

Time Tracking:
Not Specified

File Attachments:
  Size
XML File pizza.wsdl 2007-06-06 03:29 AM Jervis Liu 4 kB
Zip Archive pizza_service_cxf_wsdl2java_header_bug.zip 2007-04-25 08:54 PM Chris Moesel 6 kB
Issue Links:
Reference
 

Resolution Date: 14/Jun/07 01:19 AM


 Description  « Hide
Generating a client for the EBay WSDL does not seem to work correctly.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Chris Moesel added a comment - 25/Apr/07 08:54 PM
At least one of the issues with generating from the ebay wsdl is that the headers are not included in method signatures. The following simple project and wsdl demonstrates this bug (in a way that is easier to grasp than the ebay wsdl).

The summary is as follows:

If a type that should be passed in the SOAP header is defined in its own message
rather than the request message, then CXF does not generate a parameter for that
type in the interface. There is no simple way to access that data from the header.

On the other hand, if the type is defined as a separate part of the same request
message (instead of in its own message), then the interface is generated correctly.

The attached example demonstrates a broken operation and a working one.
It is recommended you look at the wsdl to see the difference:
src/main/resources/pizza.wsdl

Then run "mvn install" and look at the generated PizzaPortType interface:
target/generated/src/main/java/com/mypizzaco/service/PizzaPortType.java

Note the difference in the method signatures of the two operations. If CXF
were working correctly, both signatures should be the same.

Jervis Liu added a comment - 05/Jun/07 10:06 AM
Hi, it looks like the test case is wrong. Code generated for operation OrderPizzaBroken is ok, header is generated. Code generated for operation OrderPizzaBroken is wrong, but this is because the wsdl is wrong: there is no part called callerID defined in tns:OrderPizzaRequest. See below:

    <wsdl:operation name="OrderPizza">
      <soap:operation soapAction=""/>
      <wsdl:input>
        <soap:header message="tns:OrderPizzaRequest" part="callerID" use="literal" />
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>

I also tried eBay wsdl, but its so huge, too hard for me to identify the specific problem reported by this Jira. Could you update the test case please? Or let me know if I did anything wrong with the testcase.

Thanks.

Jervis Liu added a comment - 06/Jun/07 03:28 AM
Ok, I've got it. I modified the attached wsdl slightly and now I can reproduce the problem Chris reported. Attached is update WSDL file

Bozhong Lin added a comment - 14/Jun/07 01:19 AM
i believe r545220 has resolved the issue

maomaode added a comment - 06/Jul/07 08:43 AM
Ok, after deep investigate the issue, i found that there's nothing related to the namespace, the method name in the CodeGenTest is really misleading. it *MUST* changed to the FromAnotherMessagePart not FromAnotherNamespace.

As per the spec, if the header from another message part, then it's optional to generate a parameter. As you can see be default cxf wsdl2java generate the same method signature as the JAXWS RI, i.e we don't generate the extra parameter for the soap:header from another message part.

However in cxf wsdl2java we have a flag to generate the optional parameter

THAT is : -exsh true