Hi
All
In my WSDL I define
2 parts for the fault message. However, when I use WSDL2Java to generate the
stub/proxy code, I find that my service method has a throw statement that
contains just the 2nd part of the fault message (defined in the
WSDL).
Has anyone been
able to do anything similar or is it a bug ??
Please email with
your comments.
Thanks
-Swastik
------------------------------------------------
<?xml
version="1.0" encoding="UTF-8"?>
<definitions name="EmpInfo-interface"
targetNamespace="urn:EmpInfo-interface"
xmlns:def="urn:EmpInfo-interface"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:hdr="urn:compaq_nsk_oss_SoapHeader"
xmlns:tns="urn:cpq_tns_EmpInfo"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<definitions name="EmpInfo-interface"
targetNamespace="urn:EmpInfo-interface"
xmlns:def="urn:EmpInfo-interface"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:hdr="urn:compaq_nsk_oss_SoapHeader"
xmlns:tns="urn:cpq_tns_EmpInfo"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<xsd:schema
targetNamespace="urn:compaq_nsk_oss_SoapHeader"
xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="SessionType">
<xsd:element name="Session">
<xsd:complexType>
<xsd:attribute use="optional"
name="SessionID"
type="xsd:string" />
<xsd:attribute use="optional"
name="BeginNewTransaction"
type="xsd:string" />
<xsd:attribute use="optional"
name="CurrentTransactionCommand"
type="xsd:string" />
<xsd:attribute use="optional"
name="SessionCommand"
type="xsd:string" />
<xsd:attribute use="optional"
name="Subsession"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:complexType>
<xsd:complexType name="EncodingType">
<xsd:element name="Encoding">
<xsd:complexType>
<xsd:attribute name="OutputEncoding" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:complexType>
</xsd:schema>
<xsd:schema
targetNamespace="urn:cpq_tns_EmpInfo"
xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="empname">
<xsd:sequence>
<xsd:element name="first" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="last" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="middle" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:schema
targetNamespace="urn:compaq_nsk_oss_SoapHeader"
xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="SessionType">
<xsd:element name="Session">
<xsd:complexType>
<xsd:attribute use="optional"
name="SessionID"
type="xsd:string" />
<xsd:attribute use="optional"
name="BeginNewTransaction"
type="xsd:string" />
<xsd:attribute use="optional"
name="CurrentTransactionCommand"
type="xsd:string" />
<xsd:attribute use="optional"
name="SessionCommand"
type="xsd:string" />
<xsd:attribute use="optional"
name="Subsession"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:complexType>
<xsd:complexType name="EncodingType">
<xsd:element name="Encoding">
<xsd:complexType>
<xsd:attribute name="OutputEncoding" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:complexType>
</xsd:schema>
<xsd:schema
targetNamespace="urn:cpq_tns_EmpInfo"
xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="empname">
<xsd:sequence>
<xsd:element name="first" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="last" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="middle" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name="employee_info">
<xsd:sequence>
<xsd:element name="employee_number" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="empname" type="tns:empname" minOccurs="1" maxOccurs="1"/>
<xsd:element name="regnum" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="branchnum" type="xsd:long" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:sequence>
<xsd:element name="employee_number" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="empname" type="tns:empname" minOccurs="1" maxOccurs="1"/>
<xsd:element name="regnum" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="branchnum" type="xsd:long" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EmpInfoResponse0">
<xsd:sequence>
<xsd:element name="reply_code" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="employee_info" type="tns:employee_info" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name="EmpInfoResponse1">
<xsd:sequence>
<xsd:element name="reply_code" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="error_text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:sequence>
<xsd:element name="reply_code" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="error_text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="detailString">
<xsd:sequence>
<xsd:element name="EmpInfoResponse1" type="tns:EmpInfoResponse1_wrapper" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EmpInfoResponse1_wrapper">
<xsd:sequence>
<xsd:element name="EmpInfoResponse1" type="tns:EmpInfoResponse1" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name="EmpInfo">
<xsd:sequence>
<xsd:element name="request_code" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="employee_number" type="xsd:long" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:sequence>
<xsd:element name="request_code" type="xsd:long" minOccurs="1" maxOccurs="1"/>
<xsd:element name="employee_number" type="xsd:long" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
</types>
<message
name="outEmpInfoResponse0">
<part name="EmpInfoResponse0"
type="tns:EmpInfoResponse0"/>
</message>
<part name="EmpInfoResponse0"
type="tns:EmpInfoResponse0"/>
</message>
<message
name="outEmpInfoResponse1">
<part name="detailCode"
type="xsd:string"/>
<part name="detailString"
type="tns:detailString"/>
</message>
<part name="detailCode"
type="xsd:string"/>
<part name="detailString"
type="tns:detailString"/>
</message>
<message name="inEmpInfo">
<part name="EmpInfo"
type="tns:EmpInfo"/>
</message>
<part name="EmpInfo"
type="tns:EmpInfo"/>
</message>
<message name="nss_SoapSessionHeader">
<part name="Session"
type="hdr:SessionType"
/>
</message>
<message name="nss_SoapEncodingHeader">
<part name="Encoding"
type="hdr:EncodingType"
/>
</message>
<portType
name="portEmpInfo">
<operation
name="EmpInfo">
name="EmpInfo">
<input
name="inEmpInfo"
message="def:inEmpInfo"/>
name="inEmpInfo"
message="def:inEmpInfo"/>
<output
name="outEmpInfoResponse0"
message="def:outEmpInfoResponse0"/>
name="outEmpInfoResponse0"
message="def:outEmpInfoResponse0"/>
<fault
name="outEmpInfoResponse1"
message="def:outEmpInfoResponse1"/>
name="outEmpInfoResponse1"
message="def:outEmpInfoResponse1"/>
</operation>
</portType>
</portType>
<binding
name="EmpInfoBinding"
type="def:portEmpInfo">
name="EmpInfoBinding"
type="def:portEmpInfo">
<soap:binding
style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation
type="def:EmpInfo"
name="EmpInfo">
<soap:operation
soapAction="EmpInfo"/>
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation
type="def:EmpInfo"
name="EmpInfo">
<soap:operation
soapAction="EmpInfo"/>
<input
name="inEmpInfo">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="EmpInfo"
use="encoded"/>
<soap:header
wsdl:required="false"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
message="def:nss_SoapSessionHeader"
part="Session"
use="encoded" />
<soap:header
wsdl:required="false"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
message="def:nss_SoapEncodingHeader"
part="Encoding"
use="encoded" />
</input>
<output name="outEmpInfoResponse0">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="EmpInfo"
use="encoded"/>
<soap:header
wsdl:required="false"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
message="def:nss_SoapSessionHeader"
part="Session"
use="encoded" />
</output>
<fault name="outEmpInfoResponse1">
<soap:fault
name="outEmpInfoResponse1"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:cpq_tns_EmpInfo"
use="literal"
/>
</fault>
</operation>
</binding>
<service name="EmpInfoService">
<port name="def:portEmpInfo"
binding="def:EmpInfoBinding">
<soap:address location="http://www.mycompany.com/EmpServer"/>
</port>
</service>
</definitions>
---------------------------------------------------------------------
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="EmpInfo"
use="encoded"/>
<soap:header
wsdl:required="false"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
message="def:nss_SoapSessionHeader"
part="Session"
use="encoded" />
<soap:header
wsdl:required="false"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
message="def:nss_SoapEncodingHeader"
part="Encoding"
use="encoded" />
</input>
<output name="outEmpInfoResponse0">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="EmpInfo"
use="encoded"/>
<soap:header
wsdl:required="false"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
message="def:nss_SoapSessionHeader"
part="Session"
use="encoded" />
</output>
<fault name="outEmpInfoResponse1">
<soap:fault
name="outEmpInfoResponse1"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:cpq_tns_EmpInfo"
use="literal"
/>
</fault>
</operation>
</binding>
<service name="EmpInfoService">
<port name="def:portEmpInfo"
binding="def:EmpInfoBinding">
<soap:address location="http://www.mycompany.com/EmpServer"/>
</port>
</service>
</definitions>
---------------------------------------------------------------------
Swastik
Bihani
hp - NonStop
Software and Solutions Org (NSSO)
19333 Vallco
Parkway.
Cupertino, CA 95014
Tel : 408-285-4083
<<image001.gif>>