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

Modifying the SOAP-ENV:Envelope to add attribute

Expand Messages
  • teden
    Folks, Got a weird one. It seems I need to modify the Envelope to include a couple of schema references aka
    Message 1 of 2 , Aug 29, 2005
    • 0 Attachment
      Folks,

      Got a weird one. It seems I need to modify the Envelope to include a
      couple of schema references aka

      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:message="http://service.something.com/message/"
      xmlns:glob="http://service.something.com/glob/">

      I have been fiddling with the SOAP::Lite call to no avail Anyone got
      some pointers?

      Here's my call:

      $myInvoke = SOAP::Data
      ->name("n:myMethod")
      ->attr({"xmlns:n"=>"http://service.something.com/mm/"});

      $Response= SOAP::Lite
      ->outputxml( "1" )
      ->proxy( $opt_p )
      ->call( $myInvoke
      => SOAP::Data->type( "xml" )->value( $parm )
      => SOAP::Header->name( "FirstContext" => $FirstContext)->type(
      "xml" )
      => SOAP::Header->name( "SecondContext" => $SecondContext)->type(
      "xml" )
      );

      Any help is greatly appreciated.

      Thom Eden
    • Richard Gregory
      Hi Thom, I m just a perl newbie (and I m really only using it to try to test interoperability for my Java web services), so this may, or may not be the answer.
      Message 2 of 2 , Aug 31, 2005
      • 0 Attachment
        Hi Thom,

        I'm just a perl newbie (and I'm really only using it to try to test interoperability for my Java
        web services), so this may, or may not be the answer. I had a similar problem when I needed to
        specify a different schema instance to the one used by SOAP::Lite as a default, and this worked
        for me:

        use SOAP::Lite;
        use HTTP::Cookies;

        my $soap = SOAP::Lite
        -> uri('urn:advancedquery.ws.biors.biomax.de')
        -> proxy('http://146.107.217.111:8081/axis/services/AdvancedQuery',
        cookie_jar => HTTP::Cookies->new(autosave => 1, ignore_discard => 1));

        $soap->serializer->namespaces({"http://schemas.xmlsoap.org/soap/encoding/"=>"SOAP-ENC",
        "http://schemas.xmlsoap.org/soap/envelope/"=>"SOAP-ENV",
        "http://www.w3.org/2001/XMLSchema"=>"xsd", "http://www.w3.org/2001/XMLSchema-instance"=>"xsi"});


        my $result = $soap
        -> getElementEntry('{swissprot}: [[AllText EQ text:lys4;]]', ["_ID_", "AccNumber",
        "Sequence"]);

        I think the answer for you is the $soap->serializer->namespaces... statement, but as I said, I'm
        not that knowledgeable, and I'm not entirely sure how you'd integrate it into your code, so I'll
        leave that for you. Hope this helps

        Richard.

        --- teden <thom@...> wrote:


        ---------------------------------
        Folks,

        Got a weird one. It seems I need to modify the Envelope to include a
        couple of schema references aka

        <SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:message="http://service.something.com/message/"
        xmlns:glob="http://service.something.com/glob/">

        I have been fiddling with the SOAP::Lite call to no avail Anyone got
        some pointers?

        Here's my call:

        $myInvoke = SOAP::Data
        ->name("n:myMethod")
        ->attr({"xmlns:n"=>"http://service.something.com/mm/"});

        $Response= SOAP::Lite
        ->outputxml( "1" )
        ->proxy( $opt_p )
        ->call( $myInvoke
        => SOAP::Data->type( "xml" )->value( $parm )
        => SOAP::Header->name( "FirstContext" => $FirstContext)->type(
        "xml" )
        => SOAP::Header->name( "SecondContext" => $SecondContext)->type(
        "xml" )
        );

        Any help is greatly appreciated.

        Thom Eden




        SPONSORED LINKS
        Protocol analyzer
        Ssl protocol Sip protocol
        Protocol analysis Modbus protocol
        Communication and networking


        ---------------------------------
        YAHOO! GROUPS LINKS


        Visit your group "soaplite" on the web.

        To unsubscribe from this group, send an email to:
        soaplite-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


        ---------------------------------






        ___________________________________________________________
        To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.