I also found the generated code didn't work since it
tried to unmarshall the SOAP document to the just
generated exception class (an inner class in the stub
class). There is nowhere that the binding defined for
the exception class.

John

--- Z Chen <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am using WSDL2JAVA to generate Stub class to
> invoke
> a remote web services and I have SOAPFault defined
> in
> my wsdl and schema. But the tool always generates a
> Exception class for me, it is even a inner class in
> my
> Stub class. How can I map it to an existing Java
> exception class ? I am using Jibx as the mapping
> framework, but it looks like the tool doesn't care
> about the mapping.
> 
> Here is my wsdl definition,
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="telecom"
> 
>
targetNamespace="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0";
>       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> 
>
xmlns:tcom="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0";
>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> 
>
xmlns:xsd1="http://www.crsoftwareinc.com/xml/ns/telecom/common_types";>
>       <wsdl:documentation>
>               This document describes the telecom control
> service
> for agents.
>       </wsdl:documentation>
>       <wsdl:types>
>               <xsd:schema
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>                       elementFormDefault="qualified"
>               
>
targetNamespace="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0";
>               
>
xmlns:com="http://www.crsoftwareinc.com/xml/ns/telecom/common_types";>
>                       <xsd:import
>                       
>
namespace="http://www.crsoftwareinc.com/xml/ns/telecom/common_types";
>                               schemaLocation="telecom.xsd" />
>                       <xsd:element name="AgentLoginRequestWrap"
>                               type="com:agentLoginType" />
>                       <xsd:element name="EmptyResponseWrap"
>                               type="com:emptyResponse" />
>                       <xsd:element name="AgentSimpleRequestWrap"
>                               type="com:agentSimpleActionType" />
>                       <xsd:element name="AgentNotLoggedInFault"
>                               type="com:agentNotLoggedInFault" />
>                               
>               </xsd:schema>
>       </wsdl:types>
>       <wsdl:message name="agentLoginRequest">
>               <wsdl:part name="agentLoginRequest"
>                       element="tcom:AgentLoginRequestWrap" />
>       </wsdl:message>
>       <wsdl:message name="emptyResponse">
>               <wsdl:part name="emptyResponse"
>                       element="tcom:EmptyResponseWrap" />
>       </wsdl:message>
>       <wsdl:message name="agentSimpleRequest">
>               <wsdl:part name="agentSimpleRequest"
>                       element="tcom:AgentSimpleRequestWrap" />
>       </wsdl:message> 
>       <wsdl:message name="agentNotLoggedInFault">
>               <wsdl:part name="agentNotLoggedInFault"
>                       element="tcom:AgentNotLoggedInFault" />
>       </wsdl:message>
>       
>       <wsdl:portType name="telecom">
> 
>               <wsdl:operation name="agentLogin">
>                       <wsdl:input message="tcom:agentLoginRequest" />
>                       <wsdl:output message="tcom:emptyResponse" />
>               </wsdl:operation>
>               <wsdl:operation name="agentSimpleAction">
>                       <wsdl:input message="tcom:agentSimpleRequest" />
>                       <wsdl:output message="tcom:emptyResponse" />
>                       <wsdl:fault message="tcom:agentNotLoggedInFault"
> />
>               </wsdl:operation>
>       </wsdl:portType>
>       <wsdl:binding name="telecomSOAP"
> type="tcom:telecom">
>               <soap:binding style="document"
>                       transport="http://schemas.xmlsoap.org/soap/http";
> />
>               <wsdl:operation name="agentLogin">
>                       <soap:operation
>                       
>
soapAction="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0/agentLogin";
> />
>                       <wsdl:input>
>                               <soap:body use="literal" parts="
> agentLoginRequest" />
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal" parts=" emptyResponse"
> />
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="agentSimpleAction">
>               <soap:operation
>                       
>
soapAction="http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0/agentSimple";
> />
>                       <wsdl:input>
>                               <soap:body use="literal" parts="
> agentSimpleRequest" />
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal" parts=" emptyResponse"
> />
>                       </wsdl:output>
>                       <wsdl:fault>
>                               <soap:body use="literal" parts="
> agentNotLoggedInFault" />
>                       </wsdl:fault>
>               </wsdl:operation>
>       </wsdl:binding>
>       <wsdl:service name="agentRequestService">
>               <wsdl:port binding="tcom:telecomSOAP"
> name="telecomSOAP">
>                       <soap:address location="http://192.192.1.70:1776";
> />
>               </wsdl:port>
>       </wsdl:service>
> </wsdl:definitions>
> 
> and schema for the fault
> 
>       </xs:complexType>
>               <xs:complexType name="agentNotLoggedInFault">
>               <xs:annotation>
>                       <xs:documentation>
>                               If the agent is sending a request before logging
> in
>                       </xs:documentation>
>               </xs:annotation>
>               <xs:sequence>
>                       <xs:element name="reason" type="xs:string" />
>               </xs:sequence>
>       </xs:complexType>
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to