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

5277Re: [soaplite] Help!! Formatting SOAP::Header

Expand Messages
  • ravi0508@aim.com
    Mar 16, 2006
    • 0 Attachment
      Thank you very much Eric!  That worked!
      I have tried all variations but I could think of but the one thing I never did was include that backslash as in your example below.  Including it made my code work.  What does the backslash do in this case?  Does it just escapes the rest of the stuff?
      -----Original Message-----
      From: Eric Bridger <eric@...>
      To: ravi0508@...
      Cc: SoapLite List <soaplite@yahoogroups.com>
      Sent: 16 Mar 2006 10:14:32 -0500
      Subject: Re: [soaplite] Help!! Formatting SOAP::Header

      Have not used SOAP::Header much but in order to nest XML elements you
      need to point to a reference.
      SOAP::Header->name('AuthenticationInfo' => \SOAP::Data->value(
      On Thu, 2006-03-16 at 09:08, ravi0508@... wrote: > 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: > Messaging style = Document-Literal > Only support namespaces of 2001 (http://www.w3c.org/2001/XMLSchema) > 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.

      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