Loading ...
Sorry, an error occurred while loading the content.

RE: [soaplite] Help: Why .Net could Reject SOAP::Lite?

Expand Messages
  • Scott Seely
    The service for .NET isn’t supporting s:encodingStyle= http://schemas.xmlsoap.org/soap/encoding/ . That’s where your problem is. From:
    Message 1 of 4 , Jul 31 7:38 AM
    • 0 Attachment

      The service for .NET isn’t supporting s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/". That’s where your problem is.

       

      From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com] On Behalf Of Martin Busik
      Sent: Friday, July 31, 2009 2:52 AM
      To: soaplite@yahoogroups.com
      Cc: 'Frank Bergmann'
      Subject: AW: [soaplite] Help: Why .Net could Reject SOAP::Lite?

       

       

      Hi,
      I'd suggest to use SoapUI to find out, what exactly, i.e. what of the
      differences you have posted, causes the
      problem. Then it is easier to modify the perl code.

      If xsi:type or the namespace of handbackID is the problem, then you have to
      construct your own SOAP::Data or SOAP::Header
      objects. If s:encodingStyle then it may require a bit more work to find out
      how to disallow it.

      Cheers,
      Martin

      > -----Ursprüngliche Nachricht-----
      > Von: soaplite@yahoogroups.com
      > [mailto:soaplite@yahoogroups.com]
      Im Auftrag von Frank Bergmann
      > Gesendet: Donnerstag, 30. Juli 2009 19:22
      > An: soaplite@yahoogroups.com
      > Betreff: [soaplite] Help: Why .Net could Reject SOAP::Lite?
      >
      > Hi,
      >
      > We're trying to consume a SOAP service provided by .Net.
      > We've got a reference SOAP request that works. Then we've
      > re-engineered the same request via SOAP::Lite and to me they
      > look the same. But .Net still gives us an error 400 "Bad
      Request".
      >
      > Here is the original request that works:
      >
      > <s:Envelope xmlns:s="
      href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/">
      > <s:Header>
      > <Action s:mustUnderstand="1"
      > xmlns="
      href="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://schemas.microsoft.com/ws/2005/05/addressing/none
      > ">urn:com:portsight:golem/IVendorCooperation/GetHandback</Action>
      > </s:Header>
      > <s:Body>
      > <GetHandback xmlns="urn:com:portsight:golem">
      > <handbackID xmlns="">1</handbackID>
      > </GetHandback>
      > </s:Body>
      > </s:Envelope>
      >
      >
      > And here is what we've been able to produce via SOAP::Lite:
      >
      > ?xml version="1.0" encoding="UTF-8"?>
      > <s:Envelope
      > s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      > <s:Header>
      > <Action
      > xmlns="
      href="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://schemas.microsoft.com/ws/2005/05/addressing/none
      > " s:mustUnderstand="1"
      > xsi:type="xsd:anyURI">urn:com:portsight:golem/IVendorCooperati
      > on/GetHandback</Action>
      > </s:Header>
      > <s:Body>
      > <GetHandback xmlns="urn:com:portsight:golem">
      > <handbackID xsi:type="xsd:int">1</handbackID>
      > </GetHandback>
      > </s:Body>
      > </s:Envelope>
      >
      >
      >
      > I made a diff in order to be sure not to miss anything:
      >
      > 1c1,2
      > < <s:Envelope xmlns:s="
      href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/">
      > ---
      > > <s:Envelope
      > s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      >
      > 3c4
      > < <Action s:mustUnderstand="1"
      > xmlns="
      href="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://schemas.microsoft.com/ws/2005/05/addressing/none">
      > ---
      > > <Action
      > xmlns="
      href="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://schemas.microsoft.com/ws/2005/05/addressing/none
      > " s:mustUnderstand="1" xsi:type="xsd:anyURI">
      >
      > 9c10
      > < <handbackID xmlns="">1</handbackID>
      > ---
      > > <handbackID xsi:type="xsd:int">1</handbackID>
      >
      >
      > You help would be greatly appreciated.
      >
      > Cheers!
      > Frank
      >
      >
      >
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >

    • rahed
      ... Hi, have you found offending lines which which don t match .Net service? The following code generates your original request. $SOAP::Constants::NS_ENC =
      Message 2 of 4 , Aug 1, 2009
      • 0 Attachment
        On Thu, Jul 30, 2009 at 7:21 PM, Frank Bergmann<fraber@...> wrote:

        > Here is the original request that works:
        >
        > <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        > <s:Header>
        > <Action s:mustUnderstand="1"
        > xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:com:portsight:golem/IVendorCooperation/GetHandback</Action>
        > </s:Header>
        > <s:Body>
        > <GetHandback xmlns="urn:com:portsight:golem">
        > <handbackID xmlns="">1</handbackID>
        > </GetHandback>
        > </s:Body>
        > </s:Envelope>

        Hi,

        have you found offending lines which which don't match .Net service?

        The following code generates your original request.


        $SOAP::Constants::NS_ENC = undef;

        $soap = SOAP::Lite->new(
        'uri' =>('urn:com:portsight:golem'),
        'proxy' =>('http://your/endpoint'),
        );
        $soap->autotype(0);
        $soap->envprefix('s');

        $header_data = SOAP::Header->name(Action =>
        'urn:com:portsight:golem/IVendorCooperation/GetHandback')->mustUnderstand(1)->uri('http://schemas.microsoft.com/ws/2005/05/addressing/none')->prefix('');
        push @request,$header_data;

        $body_data = SOAP::Data->name(handbackID => 1)->uri('');
        push @request,$body_data;

        $soap->GetHandback(@request);


        --
        Radek
      Your message has been successfully submitted and would be delivered to recipients shortly.