You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by jaypee_p <p....@gmail.com> on 2007/07/20 13:29:58 UTC
Axis fault handling in SAP XI client
Hi All,
I am using axis 1.4. SAP XI is my clinet. My wsdl file as below
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ws.example.com/service"
xmlns:wns="http://ws.example.com/service"
xmlns:tns="http://ws.exampleenterprise.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ws.exampleenterprise.com"
elementFormDefault="qualified">
<xs:complexType name="SecrtySbj">
<xs:sequence>
<xs:element name="usrname" type="xs:string"/>
<xs:element name="pswrd" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AuthenticateRequest">
<xs:sequence>
<xs:element name="secrtySbj" type="tns:SecrtySbj"/>
</xs:sequence>
</xs:complexType>
<xs:element name="authenticateRequest" type="tns:AuthenticateRequest"/>
<xs:complexType name="AuthenticateResponse" >
<xs:sequence>
<xs:element name="sessnId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="authenticateResponse" type="tns:AuthenticateResponse"/>
<xs:complexType name="customFault">
<xs:sequence>
<xs:element name="customCd" type="xs:int"/>
<xs:element name="customMsg" type="xs:string" minOccurs="0"/>
<xs:element name="customExcp" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:element name="customFault" type="tns:customFault"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="authRequest">
<wsdl:part name="parameters" element="tns:authenticateRequest"/>
</wsdl:message>
<wsdl:message name="authResponse">
<wsdl:part name="result" element="tns:authenticateResponse"/>
</wsdl:message>
<wsdl:message name="CustomFault">
<wsdl:part name="CustomFault" element="tns:customFault"/>
</wsdl:message>
<wsdl:portType name="AuthenticateServiceInterface">
<wsdl:operation name="authenticate">
<wsdl:input message="wns:authRequest" />
<wsdl:output message="wns:authResponse" />
<wsdl:fault name="CustomFault" message="wns:CustomFault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AuthenticateServiceSoapBinding"
type="wns:AuthenticateServiceInterface">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="authenticate">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CustomFault" >
<soap:fault name="CustomFault" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AuthenticateServiceService">
<wsdl:port name="AuthenticateService"
binding="wns:AuthenticateServiceSoapBinding">
<soap:address
location="http://10.236.14.6:8080/axis/services/AuthenticateService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Axis generates the soap fault as below in detail tag as below
<ns1:customFault xmlns:ns1="http://ws.examplenterprise.com">
<ns1:customCd>123</ns1:customCd>
<ns1:customMsg>Password is wrong</ns1:customMsg>
<ns1:customExcp>CustomException</ns1:customExcp>
</ns1:customFault>
They are getting error like below while getting the fault message.
<SAP:ApplicationFaultMessage
namespace="http://ws.exampleenterprise.com">customfault<SAP:ApplicationFaultMessage>
Question: Why it is throwing "ApplicationFaultMessage" for fault messages?
is there any error in wsdl file in defining the elements? or style has to be
different? or is it an namespace issue in the wsdl?
Note: They are able to do it sucesssfull for the response message.
--
View this message in context: http://www.nabble.com/Axis-fault-handling-in-SAP-XI-client-tf4116522.html#a11706509
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis fault handling in SAP XI client
Posted by Anne Thomas Manes <at...@gmail.com>.
My guess is that this is the way XI processes custom faults. I suggest
you ask your question on an SAP XI discussion list.
Anne
On 7/20/07, jaypee_p <p....@gmail.com> wrote:
>
> Hi All,
>
> I am using axis 1.4. SAP XI is my clinet. My wsdl file as below
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://ws.example.com/service"
> xmlns:wns="http://ws.example.com/service"
> xmlns:tns="http://ws.exampleenterprise.com"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:types>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://ws.exampleenterprise.com"
> elementFormDefault="qualified">
> <xs:complexType name="SecrtySbj">
> <xs:sequence>
> <xs:element name="usrname" type="xs:string"/>
> <xs:element name="pswrd" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="AuthenticateRequest">
> <xs:sequence>
> <xs:element name="secrtySbj" type="tns:SecrtySbj"/>
> </xs:sequence>
> </xs:complexType>
> <xs:element name="authenticateRequest" type="tns:AuthenticateRequest"/>
> <xs:complexType name="AuthenticateResponse" >
> <xs:sequence>
> <xs:element name="sessnId" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> <xs:element name="authenticateResponse" type="tns:AuthenticateResponse"/>
> <xs:complexType name="customFault">
> <xs:sequence>
> <xs:element name="customCd" type="xs:int"/>
> <xs:element name="customMsg" type="xs:string" minOccurs="0"/>
> <xs:element name="customExcp" type="xs:string" minOccurs="0"/>
> </xs:sequence>
> </xs:complexType>
> <xs:element name="customFault" type="tns:customFault"/>
> </xs:schema>
> </wsdl:types>
> <wsdl:message name="authRequest">
> <wsdl:part name="parameters" element="tns:authenticateRequest"/>
> </wsdl:message>
> <wsdl:message name="authResponse">
> <wsdl:part name="result" element="tns:authenticateResponse"/>
> </wsdl:message>
> <wsdl:message name="CustomFault">
> <wsdl:part name="CustomFault" element="tns:customFault"/>
> </wsdl:message>
> <wsdl:portType name="AuthenticateServiceInterface">
> <wsdl:operation name="authenticate">
> <wsdl:input message="wns:authRequest" />
> <wsdl:output message="wns:authResponse" />
> <wsdl:fault name="CustomFault" message="wns:CustomFault"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="AuthenticateServiceSoapBinding"
> type="wns:AuthenticateServiceInterface">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
> <wsdl:operation name="authenticate">
> <soap:operation soapAction=""/>
> <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="CustomFault" >
> <soap:fault name="CustomFault" use="literal" />
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="AuthenticateServiceService">
> <wsdl:port name="AuthenticateService"
> binding="wns:AuthenticateServiceSoapBinding">
> <soap:address
> location="http://10.236.14.6:8080/axis/services/AuthenticateService"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
> Axis generates the soap fault as below in detail tag as below
>
> <ns1:customFault xmlns:ns1="http://ws.examplenterprise.com">
> <ns1:customCd>123</ns1:customCd>
> <ns1:customMsg>Password is wrong</ns1:customMsg>
> <ns1:customExcp>CustomException</ns1:customExcp>
> </ns1:customFault>
>
> They are getting error like below while getting the fault message.
>
> <SAP:ApplicationFaultMessage
> namespace="http://ws.exampleenterprise.com">customfault<SAP:ApplicationFaultMessage>
>
> Question: Why it is throwing "ApplicationFaultMessage" for fault messages?
> is there any error in wsdl file in defining the elements? or style has to be
> different? or is it an namespace issue in the wsdl?
>
> Note: They are able to do it sucesssfull for the response message.
>
>
> --
> View this message in context: http://www.nabble.com/Axis-fault-handling-in-SAP-XI-client-tf4116522.html#a11706509
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org