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

5275Help!! Formatting SOAP::Header

Expand Messages
  • ravi0508@aim.com
    Mar 16, 2006
      Hello All,
       
           First off, I am a SOAP newbie and I am trying to write a perl script (ActivePerl 5.8.7-815) which consumes a web service published by Remedy ARS 6.3.15.
       
           Remedy wants the XML to be in the following form:
      1. Messaging style = Document-Literal
      2. Only support namespaces of 2001 (http://www.w3c.org/2001/XMLSchema)
      3. The authentication information must be in the soap header section of the XML in the form of:
      <AuthenticationInfo>
      <userName>blahblahblah</userName>
      <password>blehblehbleh</password>
      </AuthenticationInfo>
      When I try to nest the AuthenticationInfo as in the example below:
      SOAP::Header->name('AuthenticationInfo' => SOAP::Header->value(
            SOAP::Header->name('userName)->value('blahblahblah'),
            SOAP::Header->name('password')->value('blehblehbleh')
      );
      I see that the XML that is actually passed to Remedy does not include the <AuthenticationInfo> tags, only the <userName> and <password> tags are included in the header section.
       
      Below is an example of the XML that is being generated by my perl script (the password is a blank password):
      ?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:xsi="
      http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      >
        <SOAP-ENV:Header
        >
          <userName xsi:type="xsd:string"
          >blahblahblah</userName>
          <password xsi:type="xsd:string"/></SOAP-ENV:Header>
        <SOAP-ENV:Body
        >
          <OpGet xmlns=""
          >
            <Request_ID xsi:type="xsd:int"
            >000000000000045</Request_ID></OpGet></SOAP-ENV:Body></SOAP-ENV:Envelope>
      Does anyone know why the AuthenticationInfo tags in the header are getting stripped out?  Is the above XML in Document-Literal style?  If it is not, does anyone know how to force it to be document literal?  And could that be the reason why the AuthenticationInfo tags are being stripped?
       
      I am using SOAP::Lite version 0.55 which comes with ActivePerl version 5.8.7-815.
       
      Thank you all,
      Ravi

      Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.
    • Show all 5 messages in this topic