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

6562Adding attributes to envelope tag / changing name of a body tag

Expand Messages
  • gtbaddy
    Jan 14, 2011
    • 0 Attachment
      Hi, thanks to the help Martin gave me in my previous post I am getting much closer to having things working. I am successfully sending calls to the service using SOAP::Lite now, but I am still having trouble getting it to build the XML exactly as I need it.

      I have been using the tool soapUI to test some calls to this web service, so it has been a good help since it gives me some examples of what XML works with this web service. I have been comparing it with the XML that SOAP::Lite is generating and I have identified the two parts that are wrong causing my calls not to work.

      1. My call from SOAP::Lite uses the following envelope tag:

      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      I need to get the envelop tag to have these attributes instead:

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.scene7.com/IpsApi/xsd" xmlns:ns="http://www.scene7.com/IpsApi/xsd/2010-01-31">

      Is there a way for me to have precise control over the those namespace attributes on the envelope (specifically xmlns:xsd & xmlns:ns)?

      2. I am using the following code to pass paramaters to the method checkLogin:

      my $params = SOAP::Data->name("ns:checkLoginParam" =>

      # request method
      $soap->call('checkLogin', $params, $authHeader);

      .. this produces the following xml ...

      <checkLogin xmlns="http://www.scene7.com/IpsApi/xsd/2010-01-31">

      Is there a way for me to remove the checkLogin tag from being wrapped around checkLoginParam? The working code that I have from soapUI that I am attempting to reproduce is this:


      Thanks for your time all,
    • Show all 2 messages in this topic