You are here iC Home > Know-how > Perl > SOAP > Namespaces in SOAP

Perl / SOAP

2 Namespaces in SOAP

20.06.2006
1 Introduction to SOAP [  up  ] - [ a - z ] - [ search PC ] - [ top ] 3 SOAP::Lite

How to set the namespace prefix for the request to the specified values?

I have to send attributes as

<urn:Foo> ... </urn:Foo>

and not

<Foo xsi:type="..."> ... </Foo>

The part «xsi:type...» is beeing added automatically by SOAP::Lite :-|
I have found a related hint in the man page so far:
ns($uri,$prefix=undef)

Sets the namespace uri and optionally the namespace prefix for the request to the specified values. This overrides any previous namespace declaration that may have been set using a previous call to "ns()" or "default_ns()". If a prefix is not specified, one will be generated for you automatically. Setting the namespace causes elements to be serialized with a declared namespace prefix, like so:


<soap:Envelope>
	<soap:Body>
		<my:myMethod xmlns:my="http://www.someuri.com">
		  <my:foo />
		</my:myMethod>
	</soap:Body>
</soap:Envelope>

Voilà! So it has to be possible to be set! How to set the f*** "my:..." prefix in SOAP::Lite? It might be something like the following code snippet but I could not find any suitable combination yet :-|
SOAP::Data->name('output_one' => "one")->uri("urn:Test")

→ Open related posting: groups.yahoo.com/group/soaplite/message/5442

This might be a solution?
/perl/ files/soap/nested code3mail fin pl.txt


See also:
  • primus.pgate.net/cgi-bin/dbboard/showitem.cgi?id=97&content_only=1
  • SOAP::Lite Docs: SOAP Serializer 8 of 10 stars - Reference Perl
    The SOAP::Serializer class is the means by which the toolkit manages the expression of data as XML. The object that a SOAP::Lite instance uses by default is generally enough for the task, with no need for the application to create its own. The main purpose of this class is to provide a place for applications to extend the serializer by defining additional methods for handling new datatypes
    majordojo.com/soaplite/docs/SOAP/Serializer.html

 
1 Introduction to SOAP
2 Namespaces in SOAP
3 SOAP::Lite
 3.1Construct an object    
 3.2How to debug    
  3.2.1    Debugging Flag
 3.3How to set a timeout (s)    
 3.4Manpage of SOAP::Lite    



Advanced search tips
1 Introduction to SOAP [  up  ] - [ top ] 3 SOAP::Lite



[ home ] - [ search ] - [ feedback ]

copyright by reto - created with mytexi