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

4658Re: [soaplite] namespace/nesting problem: The Answer

Expand Messages
  • Byrne Reese
    May 7, 2005
    • 0 Attachment
      In 0.60 and 0.65 there is a method call called "register_ns" which will
      create a namespace and place its definition in the soap envelope. You
      can specify a prefix or let SOAP::Lite generate one for you. If you need
      to determine the prefix of an autogenerated namespace, then use the
      find_ns subroutine.

      SOAP::Data also lets you have complete and total control over the
      namespaces, prefixes, attributes, and what have you.

      Consider looking at the following resource for help:

      http://www.majordojo.com/soaplite/

      Chris Nielsen wrote:

      >
      > After more head-banging and a thoughtful reply from the auther of this
      > message: http://groups.yahoo.com/group/soaplite/message/2500 with a very
      > similar looking situation, it appears the answer is that Soap::Lite is
      > not
      > well suited to the problem, and I am better off rolling my own. Joe
      > suggested templated output, and using XML Parser for getting back data.
      >
      > So, it appears the answer is to give up on Soap::Lite for this
      > application.
      >
      > I'd love to hear from Soap::Lite users who have better ideas! :-)
      >
      > It would appear that the Soap::Lite docs could benefit from haing some
      > information on where Soap::Lite is appropriate, and when it is not- to
      > save some of us many hours of frustration!
      >
      > Cheers,
      > C
      >
      > On Mon, 2 May 2005, Chris Nielsen wrote:
      >
      > >
      > > Hi all...
      > > I didn't see this come to me from the list, so I'll try agian... If
      > anyone
      > > has a hint several people will be most appreciative!
      > >
      > > The vast majority of Soap::Lite examples (all that I can recall) and
      > other
      > > details seem to always have the simple <SOAP-ENV:Body> type tag.
      > However,
      > > it appears that my requirement is to modify that tag, and also to
      > have 2
      > > non-nested namespaces like this:
      > >
      >
      > > <SOAP-ENV:Body
      > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:NS2="urn:SInfotype">
      > > <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV">
      > > <metadata_a xsi:type="xsd:boolean"> </metadata_a>
      > > <metadata_b xsi:type="xsd:string"> </metadata_b>
      > > <AppDetail href="#1"/>
      > > </NS1:AppMeta>
      > > <NS2:AppDetail id="1" xsi:type="NS2:AppDetail">
      > > <app_param_a xsi:type="xsd:string"> </app_param_a>
      > > <app_param_b xsi:type="xsd:string"> </app_param_b>
      > > </NS2:AppDetail>
      > > </SOAP-ENV:Body>
      > >
      >
      > > About the closest so far is something like this - the required
      > > xmlns:NS2="urn:SInfotype" is not in the body tag, which I think has
      > to do
      > > with NS2 being *inside* NS1, which is not correct.
      > >
      >
      > > <SOAP-ENV:Body >
      > > <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV"
      > xmlns:NS2="urn:SInfotype" >
      > > <metadata_a xsi:type="xsd:boolean"> </metadata_a>
      > > <metadata_b xsi:type="xsd:boolean"> </metadata_b>
      > > <AppMeta_bogus>
      > > <NS2:AppDetail >
      > > <app_param_a xsi:type="xsd:string"> application data
      > item 1 </app_param_a>
      > > <app_param_b xsi:type="xsd:string"> application data
      > item 1 </app_param_b>
      > > </NS2:AppDetail>
      > > </AppMeta_bogus>
      > > </NS1:AppMeta>
      > > </SOAP-ENV:Body>
      > >
      >
      > > This is sanitized somewhat of course, I hope I haven't introduced any
      > > errors.
      > >
      >
      > > If anyone has ideas or knows if it is even possible to match control
      > the
      > > body tag, and un-nest the namespace elements, thanks for posting or
      > > e-mailing ideas - or ideas on work arounds.
      > >
      > > Thanks all...
      > > -C
      > >
      > >
      > >
      > >
      >
      > --
      > Christopher Nielsen chris@... http://ZORINco.com
      > ______________________________________________________________
      > Electronic Products - Consulting - Hosting
      >
      > C O N T R O L Y O U R W O R L D
      >
      >
      >
      >
      >
      >
      >
      > ------------------------------------------------------------------------
      > *Yahoo! Groups Links*
      >
      > * To visit your group on the web, go to:
      > http://groups.yahoo.com/group/soaplite/
      >
      > * To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >
    • Show all 8 messages in this topic