views:

36

answers:

1

Hi, I have a WSDL, and when I import it in visual studio, i have not the mmboxError code generated.

When the request is good, i have a good LogonResponseType with all my informations. But when I have an Exception,I can't have the mmboxError in Detail of SoapException.

The result of exception is like this :

<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<soap-env:Header/>
<soap-env:Body>
<soap-env:Fault>
<soap-env:faultcode>Client</soap-env:faultcode>
<soap-env:faultstring>Client error</soap-env:faultstring>
<soap-env:Detail> <mmboxError xmlns=”http://www.logicacmg.com/mmbox/schema/REL-1-0-0”&gt;
<status>
<statusCode>2100</StatusCode>
<statusText>incorrect user credentials</StatusText>
</status>
</mmboxError>
</soap-env:Detail>
</soap-env:Fault>
</soap-env:Body>

Can you help me please ?

Many Thanks

This is my WSDL :

    <?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/mmbox/services/urn:Logon" xmlns:intf="http://localhost:8080/mmbox/services/urn:Logon" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.test.com/mmbox/schema/REL-1-0-0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.test.com/mmbox/schema/REL-1-0-0"&gt;
 <wsdl:types>
  <s:schema elementFormDefault="qualified" targetNamespace="http://www.test.com/mmbox/schema/REL-1-0-0"&gt;
   <s:element name="Logon" type="tns:LogonRequestType">
    <s:annotation>
     <s:documentation>logon request</s:documentation>
    </s:annotation>
   </s:element>
   <s:element name="mmboxError" type="tns:mmboxErrorType">
    <s:annotation>
     <s:documentation>mmboxError ex</s:documentation>
    </s:annotation>
   </s:element>
   <s:complexType name="LogonRequestType">
    <s:sequence>
     <s:element name="Version" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="Username" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="Password" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="Role" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="PresentationId" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="Trusted" type="s:string" minOccurs="0" maxOccurs="1"/>
    </s:sequence>
   </s:complexType>
   <s:element name="LogonResponse" type="tns:LogonResponseType">
    <s:annotation>
     <s:documentation>logon response</s:documentation>
    </s:annotation>
   </s:element>
   <s:complexType name="LogonResponseType">
    <s:sequence>
     <s:element name="Status" type="tns:StatusType" minOccurs="1" maxOccurs="1"/>
     <s:element name="SessionId" type="s:string" minOccurs="1" maxOccurs="1"/>
    </s:sequence>
   </s:complexType>
   <s:complexType name="StatusType">
    <s:sequence>
     <s:element name="StatusCode" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="StatusText" type="s:string" minOccurs="1" maxOccurs="1"/>
    </s:sequence>
   </s:complexType>
   <s:complexType name="mmboxErrorType">
    <s:sequence>
     <s:element name="statusCode" type="s:string" minOccurs="1" maxOccurs="1"/>
     <s:element name="statusText" type="s:string" minOccurs="1" maxOccurs="1"/>
    </s:sequence>
   </s:complexType>
  </s:schema>
 </wsdl:types>
 <wsdl:message name="processResponse">
  <wsdl:part name="processReturn" element="tns:LogonResponse"/>
 </wsdl:message>
 <wsdl:message name="processRequest">
  <wsdl:part name="part" element="tns:Logon"/>
 </wsdl:message>
 <wsdl:message name="mmboxErroFaultMessager">
  <wsdl:part name="fault" element="tns:mmboxError"/>
 </wsdl:message>
 <wsdl:portType name="Logon">
  <wsdl:operation name="Logon">
   <wsdl:input name="processRequest" message="tns:processRequest"/>
   <wsdl:output name="processResponse" message="tns:processResponse"/>
   <wsdl:fault name="fault" message="tns:mmboxErroFaultMessager"/>
  </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="LogonSoapBinding" type="tns:Logon">
  <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
  <wsdl:operation name="Logon">
   <wsdlsoap:operation soapAction=""/>
   <wsdl:input name="processRequest">
    <wsdlsoap:body use="literal" namespace="http://www.test.com/mmbox/schema/REL-1-0-0"/&gt;
   </wsdl:input>
   <wsdl:output name="processResponse">
    <wsdlsoap:body use="literal" namespace="http://localhost:8080/mmbox/services/urn:Logon"/&gt;
   </wsdl:output>
   <wsdl:fault name="fault">
    <wsdlsoap:body use="literal" namespace="http://localhost:8080/mmbox/services/urn:Logon"/&gt;
   </wsdl:fault>
  </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="LogonService">
  <wsdl:port name="tns:Logon" binding="tns:LogonSoapBinding">
   <wsdlsoap:address location="http://localhost:8080/mmbox/services/urn:Logon"/&gt;
  </wsdl:port>
 </wsdl:service>
</wsdl:definitions>
A: 

How should you login to the site hosting the Web Service ?

The error says 'incorrect credentials'. Do you type a username/password by hand ?

Timores
Hello Timores. I have found the solution : in .Net, Exception in WDSL are never generated... I must dot it myselft in code. Many thanks for your answer
Bob