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

remove namesp1:, replace s-gensym3 and remove xsi:type="xsd:string"

Expand Messages
  • mark_yeaman
    I have a soap server (daemon based) where I need to manipulate the response ... I need to remove namesp1:, replace s-gensym3, and remove xsi:type= xsd:string
    Message 1 of 4 , Mar 15, 2003
    View Source
    • 0 Attachment
      I have a soap server (daemon based) where I need to manipulate the response ...

      I need to remove namesp1:, replace s-gensym3, and remove xsi:type="xsd:string" ... I have looked at the examples here: http://cookbook.soaplite.com/#changing%20method%20name%20in%20response , but they don't specifically address the parts I need to change... anyway to do this?

      here is response:

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:sendMessageResponse xmlns:namesp1="myService"><s-gensym3 xsi:type="xsd:string">message sent
      </s-gensym3></namesp1:sendMessageResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

      thanks for any help.
    • mark_yeaman
      ok i was able to to get the response to the following:
      Message 2 of 4 , Mar 16, 2003
      View Source
      • 0 Attachment
        ok i was able to to get the response to the following:

        <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:sendMessageResponse xmlns:namesp1="myService"><sendMessageResponse>message sent</sendMessageResponse></namesp1:sendMessageResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

        by doing this:

        return SOAP::Data->name('sendMessageResponse')->type('')->value('message sent');

        now I just need to get rid of namesp1

        Mark
      • Randy J. Ray
        ... Look at the uri method of the SOAP::Data class. You probably don t want to be rid of the namespace label, as you surely need *some* namespace there. But
        Message 3 of 4 , Mar 16, 2003
        View Source
        • 0 Attachment
          > by doing this:
          >
          > return SOAP::Data->name('sendMessageResponse')->type('')->value('message
          > sent');
          >
          > now I just need to get rid of namesp1

          Look at the "uri" method of the SOAP::Data class. You probably don't want to
          be rid of the namespace label, as you surely need *some* namespace there. But
          this will let you control it.

          Randy
          --
          """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
          Randy J. Ray Campbell, CA http://www.rjray.org rjray@...

          Silicon Valley Scale Modelers: http://www.svsm.org
        • mark_yeaman
          Hi Randy - thanks for responding... interestingly enough I dropped by the book store last night and sat on the floor with your book looking for my solution...
          Message 4 of 4 , Mar 17, 2003
          View Source
          • 0 Attachment
            Hi Randy -

            thanks for responding... interestingly enough I dropped by the book store last night and sat on the floor with your book looking for my solution... then i get an email from the author.... even better. Just for that, I will go back and buy your book today.

            I did what you said and it's fixed (updated code below):

            return SOAP::Data->name('sendMessageResult')->type('')->value('message sent')->uri('myService');

            excellent!

            Mark

            --- In soaplite@yahoogroups.com, "Randy J. Ray" <rjray@b...> wrote:
            > > by doing this:
            > >
            > > return SOAP::Data->name('sendMessageResponse')->type('')->value('message
            > > sent');
            > >
            > > now I just need to get rid of namesp1
            >
            > Look at the "uri" method of the SOAP::Data class. You probably don't want to
            > be rid of the namespace label, as you surely need *some* namespace there. But
            > this will let you control it.
            >
            > Randy
            > --
            > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
            > Randy J. Ray Campbell, CA http://www.rjray.org rjray@b...
            >
            > Silicon Valley Scale Modelers: http://www.svsm.org
          Your message has been successfully submitted and would be delivered to recipients shortly.