Discrepancy between WSDL Header and actual SOAP response Header for the same service


I have generated WSDL for a service in webMethods 6.1 which has
Request ----->>

<xsd:complexType name=“__GetHandsetManufacturerRequest2”>
<xsd:element name=“Header” type=“tns:__Header”/>
<xsd:element name=“Message” type=“tns:__Message”/>

<xsd:complexType name=“__GetHandsetManufacturerResponse2”>
<xsd:element name=“Header” type=“tns:__Header2”/>
<xsd:element name=“Message” type=“tns:__Message2”/>

But when i generate soap request using axis 1.2
following error occurs

java.lang.IllegalArgumentException: argument type mismatch

Reason being when conversion happens from xml to Java, it is not able to convert from __Header to __Header2. So we are getting “argument type mismatch” error.

webMethods send the following response

webMethods CSPortal 2007-05-08 11:44:07

Can anybody let me know why this error. It appears this is generic thing in webMethods. It has never ocurred.


You’ll have much better success and much more control over your WSDL if you create it yourself rather than using “Generate WSDL” wizard in Developer.

Go buy Erl’s book, read through the chapter on WSDL, work the examples and then find a tool like Eclipse’s WSDL Editor or XML Spy Enterprise that allows you to edit WSDL definitions and build your own. That will allow you to create XML schemas that describe your messages, import those into your WSDL and make Axis happy.