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

Re: [soaplite] wsdl and tweaks for .net interoperability

Expand Messages
  • Chris Woodfield
    Try adding $soap- ns( http://foo.com/webservices/ , tns ); This worked for me when I ran into the same issue. -C
    Message 1 of 5 , Aug 28, 2008
    • 0 Attachment
      Try adding

      $soap->ns('http://foo.com/webservices/', 'tns');

      This worked for me when I ran into the same issue.

      -C

      On Aug 28, 2008, at 2:23 AM, maurice_aubrey wrote:

      > Hi. One of our supplies updated their .net soap interface and our
      > existing SOAP::Lite code is now failing.
      >
      > We're using a wsdl specification, so all we've needed to do to this
      > point is:
      >
      > $soap = SOAP::Lite->service("file://$wsdl");
      > $soap->envprefix('SOAP-ENV');
      >
      > And then call the stubbed methods. Here's an example of the soap body
      > we're sending:
      >
      > <SOAP-ENV:Body>
      > <tns:DAEGetResortProfile>
      > <AuthID xsi:type="s:string">XXXX</AuthID>
      > <EndpointID xsi:type="s:string">USA</EndpointID>
      > <ResortID xsi:type="s:string">R1686</ResortID>
      > </tns:DAEGetResortProfile>
      > </SOAP-ENV:Body>
      >
      > The supplier is telling us it works fine for them if they repeat the
      > namespace in each parameter. So, IOW:
      >
      > <tns:AuthID xsi:type="s:string">XXXX</tns:AuthID>
      >
      > I can't figure out how to tell SOAP::Lite to do that though.
      > Can anyone help?
      >
      > Thanks,
      >
      > Maurice
      >
      >
      >
    • rahed
      ... You can first register the namespace/prefix: $soap- serializer- register_ns( uri = xmlns:tns ); and then call each object:
      Message 2 of 5 , Aug 28, 2008
      • 0 Attachment
        > <SOAP-ENV:Body>
        > <tns:DAEGetResortProfile>
        > <AuthID xsi:type="s:string">XXXX</AuthID>
        > <EndpointID xsi:type="s:string">USA</EndpointID>
        > <ResortID xsi:type="s:string">R1686</ResortID>
        > </tns:DAEGetResortProfile>
        > </SOAP-ENV:Body>
        >
        > The supplier is telling us it works fine for them if they repeat the
        > namespace in each parameter. So, IOW:
        >
        > <tns:AuthID xsi:type="s:string">XXXX</tns:AuthID>

        You can first register the namespace/prefix:

        $soap->serializer->register_ns('uri'=>'xmlns:tns');

        and then call each object:

        SOAP::Data->name(AuthID=>'XXXX')->prefix('tns');


        --
        Radek
      • maurice_aubrey
        ... That didn t seem to do anything. I m now doing this to set up the soap object. $soap = SOAP::Lite- service( file://$wsdl ); $soap- envprefix( SOAP-ENV );
        Message 3 of 5 , Aug 28, 2008
        • 0 Attachment
          --- In soaplite@yahoogroups.com, Chris Woodfield <rekoil@...> wrote:
          >
          > Try adding
          >
          > $soap->ns('http://foo.com/webservices/', 'tns');
          >
          > This worked for me when I ran into the same issue.

          That didn't seem to do anything. I'm now doing this to
          set up the soap object.

          $soap = SOAP::Lite->service("file://$wsdl");
          $soap->envprefix('SOAP-ENV');
          $soap->ns('http://www.domain.com', 'tns');

          But the output is identical to what I had before.

          Thanks,

          Maurice



          >
          > -C
          >
          > On Aug 28, 2008, at 2:23 AM, maurice_aubrey wrote:
          >
          > > Hi. One of our supplies updated their .net soap interface and our
          > > existing SOAP::Lite code is now failing.
          > >
          > > We're using a wsdl specification, so all we've needed to do to this
          > > point is:
          > >
          > > $soap = SOAP::Lite->service("file://$wsdl");
          > > $soap->envprefix('SOAP-ENV');
          > >
          > > And then call the stubbed methods. Here's an example of the soap body
          > > we're sending:
          > >
          > > <SOAP-ENV:Body>
          > > <tns:DAEGetResortProfile>
          > > <AuthID xsi:type="s:string">XXXX</AuthID>
          > > <EndpointID xsi:type="s:string">USA</EndpointID>
          > > <ResortID xsi:type="s:string">R1686</ResortID>
          > > </tns:DAEGetResortProfile>
          > > </SOAP-ENV:Body>
          > >
          > > The supplier is telling us it works fine for them if they repeat the
          > > namespace in each parameter. So, IOW:
          > >
          > > <tns:AuthID xsi:type="s:string">XXXX</tns:AuthID>
          > >
          > > I can't figure out how to tell SOAP::Lite to do that though.
          > > Can anyone help?
          > >
          > > Thanks,
          > >
          > > Maurice
          > >
          > >
          > >
          >
        • maurice_aubrey
          ... Does that mean, then, that I can t use the auto-stubbed methods from the service call? Currently I m just doing this: $soap =
          Message 4 of 5 , Aug 28, 2008
          • 0 Attachment
            --- In soaplite@yahoogroups.com, rahed <raherh@...> wrote:
            > You can first register the namespace/prefix:
            >
            > $soap->serializer->register_ns('uri'=>'xmlns:tns');
            >
            > and then call each object:
            >
            > SOAP::Data->name(AuthID=>'XXXX')->prefix('tns');

            Does that mean, then, that I can't use the auto-stubbed
            methods from the service call? Currently I'm just
            doing this:

            $soap = SOAP::Lite->service("file://$wsdl");
            $soap->envprefix('SOAP-ENV');

            And then calling the stubbed methods on it. e.g.,
            $soap->DoMyBidding().

            But if I need to modify all the params as you explain, then
            I'll need to drop the service() call and write all the stubs myself?

            Just trying to be as lazy as possible.

            Thanks,

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