Petals BC SOAP

the exception thrown on PetalsESB is different than the exception of the original webservice.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.0.5
  • Fix Version/s: 5.0.1
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    Hi,
    we are using PetalsESB with SOAP consumers and SOAP providers : Petals is a kind of layer between the REAL webservice, and the one invoked by our applications.
    I use PetalsStudio to create the serviceunits and I deploy tham in the install folder of our ESB.
    The problem is with exceptions : when calling the real webservice with an error in the SOAP packet ( invalid date for example) , we get this :

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <soap:Fault>
             <soap:Code>
                <soap:Value>soap:Sender</soap:Value>
             </soap:Code>
             <soap:Reason>
                <soap:Text xml:lang="en">Server was unable to read request. ---> There is an error in XML document (12, 47). ---> The string '2010-13-22' is not a valid AllXsd value.</soap:Text>
             </soap:Reason>
             <soap:Detail/>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>

    When passing thru the ESB, we get for the same error the following

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <soapenv:Fault>
             <faultcode xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Client</faultcode>
             <faultstring>System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (9, 47). ---> System.FormatException: The string '2010-13-13' is not a valid AllXsd value. 
       at System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds) 
       at System.Xml.XmlConvert.ToDateTime(String s, XmlDateTimeSerializationMode dateTimeOption) 
       at System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String value) 
       at System.Xml.Serialization.XmlSerializationReader.ToDateTime(String value) 
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read19_addabsence() 
       at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer32.Deserialize(XmlSerializationReader reader) 
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 
       --- End of inner exception stack trace --- 
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) 
       at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() 
       --- End of inner exception stack trace --- 
       at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() 
       at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</faultstring>
             <detail/>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>

    Why is this difference ? We have problems using the second answer in our java code , as it has been designed with the real webservice.

    Is there an option I have to set in PetalsStudio ? I left all options as default..
    Thanks

    Show
    Hi, we are using PetalsESB with SOAP consumers and SOAP providers : Petals is a kind of layer between the REAL webservice, and the one invoked by our applications. I use PetalsStudio to create the serviceunits and I deploy tham in the install folder of our ESB. The problem is with exceptions : when calling the real webservice with an error in the SOAP packet ( invalid date for example) , we get this :
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <soap:Fault>
             <soap:Code>
                <soap:Value>soap:Sender</soap:Value>
             </soap:Code>
             <soap:Reason>
                <soap:Text xml:lang="en">Server was unable to read request. ---> There is an error in XML document (12, 47). ---> The string '2010-13-22' is not a valid AllXsd value.</soap:Text>
             </soap:Reason>
             <soap:Detail/>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>
    When passing thru the ESB, we get for the same error the following
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <soapenv:Fault>
             <faultcode xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Client</faultcode>
             <faultstring>System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (9, 47). ---> System.FormatException: The string '2010-13-13' is not a valid AllXsd value. 
       at System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds) 
       at System.Xml.XmlConvert.ToDateTime(String s, XmlDateTimeSerializationMode dateTimeOption) 
       at System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String value) 
       at System.Xml.Serialization.XmlSerializationReader.ToDateTime(String value) 
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read19_addabsence() 
       at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer32.Deserialize(XmlSerializationReader reader) 
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 
       --- End of inner exception stack trace --- 
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) 
       at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() 
       --- End of inner exception stack trace --- 
       at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() 
       at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</faultstring>
             <detail/>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>
    Why is this difference ? We have problems using the second answer in our java code , as it has been designed with the real webservice. Is there an option I have to set in PetalsStudio ? I left all options as default.. Thanks
  • Environment:
    Windows.

Issue Links

Activity

Hide
noddoux added a comment - Wed, 6 Apr 2011 - 15:21:07 +0200

Hello

The difference is the version of SOAP (1.1 or 1.2). The SOAP fault are not the same according to the version of SOAP. By default the version is 1.1 in the provider role.

Try to use the parameter soap-version to change to the version to 1.2 in the jbi.xml of the provide SU, please. http://doc.petalslink.com/display/petalscomponents/Petals-BC-SOAP+4.1.x

Show
noddoux added a comment - Wed, 6 Apr 2011 - 15:21:07 +0200 Hello The difference is the version of SOAP (1.1 or 1.2). The SOAP fault are not the same according to the version of SOAP. By default the version is 1.1 in the provider role. Try to use the parameter soap-version to change to the version to 1.2 in the jbi.xml of the provide SU, please. http://doc.petalslink.com/display/petalscomponents/Petals-BC-SOAP+4.1.x
Hide
Christophe DENEUX added a comment - Tue, 6 Oct 2015 - 10:03:40 +0200

This issue is included with PETALSBCSOAP-164. Please mark this issue as resolved when PETALSBCSOAP-164 will be resolved.

Show
Christophe DENEUX added a comment - Tue, 6 Oct 2015 - 10:03:40 +0200 This issue is included with PETALSBCSOAP-164. Please mark this issue as resolved when PETALSBCSOAP-164 will be resolved.
Hide
Christophe DENEUX added a comment - Wed, 3 Apr 2019 - 08:26:13 +0200

Fixed with PETALSBCSOAP-164

Show
Christophe DENEUX added a comment - Wed, 3 Apr 2019 - 08:26:13 +0200 Fixed with PETALSBCSOAP-164

People

Dates

  • Created:
    Fri, 25 Mar 2011 - 15:06:34 +0100
    Updated:
    Wed, 3 Apr 2019 - 08:26:13 +0200
    Resolved:
    Wed, 3 Apr 2019 - 08:26:13 +0200