Search the web
Sign In
New User? Sign Up
soaplite · SOAP::Lite for Perl (soaplite.com)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 6373 - 6402 of 6402   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#6402 From: "Martin Busik" <martin.busik@...>
Date: Thu Nov 26, 2009 7:48 pm
Subject: AW: Use of inherited AUTOLOAD for non-method SOAP::Serializer::as_base64Binary()
mbusik70
Offline Offline
Send Email Send Email
 
Hi,

> When a SOAP::Lite server returns a hash array to a Python
> client, and one of the hash fields is a large chunk of binary
> data (actually the contents of a .wav file), the following is
> printed on stdout:
>
> Use of inherited AUTOLOAD for non-method
> SOAP::Serializer::as_base64Binary() is deprecated at
> /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 1167.
>
> When using a Perl client, it works correctly. Here's the SOAP
> request from the Python client:

If this is a server message, then it should be returned, whatever client
sends the request. I suppose, perl and python do not generate the same
request.

You might try SoapUI (www.soapui.com) to find out what part of a request
causes the problem.

> Use of inherited AUTOLOAD for non-method
SOAP::Serializer::as_base64Binary()
> is deprecated at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 1167.

The code causing the problem has to do with the "autotype" feature.

Cheers,
Martin

#6401 From: "Martin Busik" <martin.busik@...>
Date: Thu Nov 26, 2009 9:25 pm
Subject: AW: getting NIL string on custom Akamai datatype
mbusik70
Offline Offline
Send Email Send Email
 
Hi Dave,

the problem is, that SOAP::Lite does not serialize ArrayOfXXX types.

There are 2 ways to solve it:

1. define an own serializer:
---------------------
sub serialize_array {
     my ($self, $value, $name, $type, $attr) = @_;
     return [
         $name,
         { %$attr },
         [ map { SOAP::Data->name("item")->value($_)->type("") } @$value ],
     ];
}

*SOAP::Serializer::as_ArrayOfInt = \&serialize_array;
*SOAP::Serializer::as_ArrayOfString = \&serialize_array;

$service->serializer->typelookup->{ArrayOfInt} = [99, sub { ref($_[0]) eq
'ARRAY' }, 'as_ArrayOfInt'];
$service->serializer->typelookup->{ArrayOfString} = [99, sub { ref($_[0]) eq
'ARRAY' }, 'as_ArrayOfString'];

my @cp2 = (123);
my @columns = ("abc","def");

my $t = $service->getTrafficSummaryForCPCode( \@cp2
,'2009-11-00T00:00:00','2009-11-05T00:00:00','PST8PDT',\@columns);
-------------------------

2. Do not use the SOAP::Lite's serialization at all, construct your request
yourself.
As you are using a stub, make the parameters array emtpy, i.e. delete the
following lines:

     parameters => [
       SOAP::Data->new(name => 'cpcodes', type => 'tns1:ArrayOfInt', attr =>
{}),
       SOAP::Data->new(name => 'start', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'end', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'timeZone', type => 'xsd:string', attr => {}),
       SOAP::Data->new(name => 'columns', type => 'tns1:ArrayOfString', attr
=> {}),
     ], # end parameters

then call the service as follows:

my $t = $service->getTrafficSummaryForCPCode(
	 SOAP::Data->name('cpcodes')->type(undef)->value( \SOAP::Data->value(
             SOAP::Data->name('item')->value(123)->type(undef)
     )),

SOAP::Data->name('start')->type('xsd:dateTime')->value('2009-11-26T00:00:00'
),
     ...
);

Cheers,
Martin

#6400 From: "Martin Busik" <martin.busik@...>
Date: Thu Nov 26, 2009 9:29 pm
Subject: AW: namespaces, was: SOAP Lite problems.
mbusik70
Offline Offline
Send Email Send Email
 
Hi,

> How to insert a Namespace inside SOAP:Header Tag? I know how
> to do it for childnodes but not for the first node , the actual
>
> SOAP::Header?
>
> Same query for SOAP::Body

$namespace = "urn:myns";
     $proxy->serializer->register_ns($namespace);
     my $prefix = $proxy->serializer->find_prefix($namespace);

then you can use the prefix in your elements, e.g.:
SOAP::Data->name("$prefix:mydata")

Cheers,
Martin

#6399 From: "davemangot" <dave@...>
Date: Mon Nov 23, 2009 6:15 pm
Subject: Re: getting NIL string on custom Akamai datatype
davemangot
Offline Offline
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Aleksandar Jelenak <aleksandar.jelenak@...>
wrote:
>
> > my @cp2;
> > $cp2[0] = '33333';
>
> It is shorter to write:
>
> my @cp2 = (33333);
>
> > my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-00T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns);
>
> The start date is not valid: 2009-11-00. You probably meant
> 2009-11-01. Maybe this is the real culprit?
>
>        -Aleksandar
>

You are correct, but even after fixing the date (which had been correct in
previous versions) SOAP::Lite still does not pass in my array to the server.

my @cp2 = (33333);
my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-01T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns); # WS Call

<soap:Body><akasiteDeldt:getTrafficSummaryForCPCode><cpcodes xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfInt" /><start
xsi:type="xsd:dateTime">2009-11-01T00:00:00</start><end
xsi:type="xsd:dateTime">2009-11-05T00:00:00</end><timeZone
xsi:type="xsd:string">PST8PDT</timeZone><columns xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfString"
/></akasiteDeldt:getTrafficSummaryForCPCode></soap:Body>


Is there any more debugging I can turn on to find out why it won't properly
format my data structure?


-Dave

#6398 From: Aleksandar Jelenak <aleksandar.jelenak@...>
Date: Sat Nov 21, 2009 2:25 am
Subject: Re: getting NIL string on custom Akamai datatype
aleksandar.jelenak@...
Send Email Send Email
 
> my @cp2;
> $cp2[0] = '33333';

It is shorter to write:

my @cp2 = (33333);

> my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-00T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns);

The start date is not valid: 2009-11-00. You probably meant
2009-11-01. Maybe this is the real culprit?

        -Aleksandar

#6397 From: "davemangot" <dave@...>
Date: Fri Nov 20, 2009 9:58 pm
Subject: getting NIL string on custom Akamai datatype
davemangot
Offline Offline
Send Email Send Email
 
Hi,

    I'm kinda at wits end so hopefully this will make some sense.  I'm trying to
get a report from Akamai using their SOAP interface.

    I downloaded their WSDL file and used stubmaker.pl to generate the Perl
module.  I'm using SOAP::Lite version  0.710.10.

    Here is the call I make from my client:
my @cp2;
$cp2[0] = '33333';
my $returnResult =
$service->getTrafficSummaryForCPCode(\@cp2,'2009-11-00T00:00:00','2009-11-05T00:\
00:00','PST8PDT',\@columns);

Which is a call to:
getTrafficSummaryForCPCode => {
     endpoint =>
'https://control.akamai.com/nmrws/services/SiteAcceleratorReportService',
     soapaction => '',
     namespace => 'https://control.akamai.com/SiteAcceleratorReportService.xsd',
     parameters => [
       SOAP::Data->new(name => 'cpcodes', type => 'akasiteDeldt:ArrayOfInt', attr
=> {}),
       SOAP::Data->new(name => 'start', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'end', type => 'xsd:dateTime', attr => {}),
       SOAP::Data->new(name => 'timeZone', type => 'xsd:string', attr => {}),
       SOAP::Data->new(name => 'columns', type => 'akasiteDeldt:ArrayOfString',
attr => {}),
     ], # end parameters
   }, # end getTrafficSummaryForCPCode


The problem is when I run this, all the fields that are straight up xsd types
(dateTime and string) work fine, but the akasiteDeldt types just show up as
blank.

<soap:Body><akasiteDeldt:getTrafficSummaryForCPCode><cpcodes xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfInt" /><start
xsi:type="xsd:dateTime">2009-11-00T00:00:00</start><end
xsi:type="xsd:dateTime">2009-11-05T00:00:00</end><timeZone
xsi:type="xsd:string">PST8PDT</timeZone><columns xsi:nil="true"
xsi:type="akasiteDeldt:ArrayOfString"
/></akasiteDeldt:getTrafficSummaryForCPCode></soap:Body>

However, for example, the first field is supposed to look like:
<cpcodes xsi:type="akasiteDeldt:ArrayOfInt"
soapenc:arrayType="xsd:int[]"><item>33244</item><item>33234</item></cpcodes>

If I change the type from akasiteDeldt:ArrayOfInt to xsd:string and pass in a
string, then it gets sent correctly (which of course breaks on the receiving
(server) end).

I'm guessing SOAP::Lite must not like the datastructure I'm passing in and
therefore will not format the fields correctly.

This is how ArrayOfInt is defined in the WSDL:

<complexType name="ArrayOfInt">
         <complexContent>
           <restriction base="soapenc:Array">
             <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
           </restriction>
         </complexContent>
       </complexType>


I've tried passing in arrays, arrays of arrays, hashes of arrays, references to
arrays, hashes, etc.  Still no luck.

How can I nail down what getTrafficSummaryForCPCode is expecting for a data
structure or why SOAP::Lite is not populating my field correctly?

Any help would be greatly appreciated.  I've run this as far with Akamai support
as I can.

Cheers,

-Dave

#6396 From: "Julian" <julianokyap@...>
Date: Fri Nov 20, 2009 10:13 am
Subject: Use of inherited AUTOLOAD for non-method SOAP::Serializer::as_base64Binary()
julian_yap
Offline Offline
Send Email Send Email
 
Hi all,

I'm having an issue and it may be a simple thing to resolve it.

When a SOAP::Lite server returns a hash array to a Python client, and one of the
hash fields is a large chunk of binary data (actually the contents of a .wav
file), the following is printed on stdout:

Use of inherited AUTOLOAD for non-method SOAP::Serializer::as_base64Binary() is
deprecated at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 1167.

When using a Perl client, it works correctly. Here's the SOAP request from the
Python client:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:get_message xmlns:ns1="Integrics/Enswitch/API" SOAP-ENC:root="1">
<v1 xsi:type="xsd:string">username</v1>
<v2 xsi:type="xsd:string">password</v2>
<v3 xsi:type="xsd:string">1234</v3>
<v4 xsi:type="xsd:string">INBOX</v4>
<v5 xsi:type="xsd:string">voicemail</v5>
<v6 xsi:type="xsd:string">msg0000</v6>
</ns1:get_message>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and here's what the client is reporting returned:

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><get_mess
ageResponse xmlns="Integrics/Enswitch/API"><gensym><name
xsi:type="xsd:string">msg0000.wav</name><mimetype
xsi:type="xsd:string">audio/x-wav</mimetype></gensym></get_messageResponse>
</soap:Body></soap:Envelope>

but there should also be a <data></data> field returned with about 500KB of
data. SOAP::Lite is 0.710.10, Perl is 5.8.8, the server OS is Centos 4.8.

Any ideas on what could be wrong?

Thanks!

#6395 From: Paolo Asioli <paolo.asioli@...>
Date: Mon Nov 16, 2009 6:14 pm
Subject: Re: Problem with request
paolo_asioli
Offline Offline
Send Email Send Email
 
Now it's working. Also, I had a single slash between http: and the IP.

Thank you very much for your help !!!!!!

Cheers,
    Paolo




Martin Busik ha scritto:
Hi Paolo,
Sorry to bother still, but looks like the perl module isn't geting the hostname correctly.
I get this error
Client-Warning: Internal response
500 Can't connect to :80 (Bad hostname '')

my $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000');
Invalid url is the problem.
It should be propably 'http://192.168.1.1:20000/'
I've copied the above string from the wsdl you've uploaded to the list.
There comes
the error from.
Cheers,
Martin


#6394 From: "Martin Busik" <martin.busik@...>
Date: Mon Nov 16, 2009 5:58 pm
Subject: Problem with request
mbusik70
Offline Offline
Send Email Send Email
 
Hi Paolo,

> Sorry to bother still, but looks like the perl module isn't
> geting the hostname correctly.
>
> I get this error
> Client-Warning: Internal response
>
> 500 Can't connect to :80 (Bad hostname '')

my $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000');

Invalid url is the problem.
It should be propably  'http://192.168.1.1:20000/'

I've copied the above string from the wsdl you've uploaded to the list.
There comes
the error from.

Cheers,
Martin

#6393 From: Paolo Asioli <paolo.asioli@...>
Date: Mon Nov 16, 2009 5:51 pm
Subject: Re: AW: Problem with request
paolo_asioli
Offline Offline
Send Email Send Email
 
Hi, Martin.

Sorry to bother still, but looks like the perl module isn't geting the hostname correctly.

I get this error
Client-Warning: Internal response

500 Can't connect to :80 (Bad hostname '')

But the code you gave me seems perfect... do you have any suggestions ? I'm running SOAP::Lite 0.69

Thanks again.

Paolo


Martin Busik ha scritto:
 

Hi Paolo,

> Is there someone that could provide me some sample code for
> this request ?

my $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000'); # Endpoint,
defined in your wsdl

my $TNS_NS = "http://www.gruppounieuro.com/wsdl";
my $TEMPURI_NS = "http://tempuri.org";

$proxy->serializer->register_ns($TNS_NS);
$proxy->serializer->register_ns($TEMPURI_NS);

my $tnsprefix = $proxy->serializer->find_prefix($TNS_NS);
my $tempuriprefix = $proxy->serializer->find_prefix($TEMPURI_NS);

my $response = $proxy->call(
"$tnsprefix:S_IntCli",

SOAP::Data->name('Cogn')->value('ANITA')->type("$tempuriprefix:scastring.wit
hnull"),

SOAP::Data->name('Nome')->value('CALLIKU')->type("$tempuriprefix:scastring.w
ithnull"),

SOAP::Data->name('Cap')->value('17055')->type("$tempuriprefix:scastring.with
null"),

SOAP::Data->name('P_iva')->value('')->type("$tempuriprefix:scastring.withnul
l"),
);

Cheers,
Martin



#6392 From: "Martin Busik" <martin.busik@...>
Date: Sun Nov 15, 2009 2:09 pm
Subject: AW: Problem with request [2 Attachments]
mbusik70
Offline Offline
Send Email Send Email
 
Hi Paolo,

> Is there someone that could provide me some sample code for
> this request ?

my  $proxy = SOAP::Lite->proxy('http:/192.168.1.1/:20000'); # Endpoint,
defined in your wsdl

     my $TNS_NS = "http://www.gruppounieuro.com/wsdl";
     my $TEMPURI_NS = "http://tempuri.org";

     $proxy->serializer->register_ns($TNS_NS);
     $proxy->serializer->register_ns($TEMPURI_NS);

     my $tnsprefix = $proxy->serializer->find_prefix($TNS_NS);
     my $tempuriprefix = $proxy->serializer->find_prefix($TEMPURI_NS);

my $response = $proxy->call(
         "$tnsprefix:S_IntCli",

SOAP::Data->name('Cogn')->value('ANITA')->type("$tempuriprefix:scastring.wit
hnull"),

SOAP::Data->name('Nome')->value('CALLIKU')->type("$tempuriprefix:scastring.w
ithnull"),

SOAP::Data->name('Cap')->value('17055')->type("$tempuriprefix:scastring.with
null"),

SOAP::Data->name('P_iva')->value('')->type("$tempuriprefix:scastring.withnul
l"),
     );

Cheers,
Martin

#6391 From: Paolo Asioli <paolo.asioli@...>
Date: Fri Nov 13, 2009 5:10 pm
Subject: Problem with request
paolo_asioli
Offline Offline
Send Email Send Email
 
Hello,

I'm trying to create a request with SOAP::Lite with the enclosed WSDL.
I'd like to obtain something like the attached request (generated by
NuSoap in PHP) but I can't find a way to write it.

Is there someone that could provide me some sample code for this request ?

Thanks a lot in advance.

Best regards,
     Paolo

2 of 2 File(s)


#6390 From: "Martin Busik" <martin.busik@...>
Date: Fri Nov 13, 2009 9:16 am
Subject: AW: Why does Soap::Lite stop parsing this response?
mbusik70
Offline Offline
Send Email Send Email
 
Hi Wes,

> As of now I'm parsing the string with XML::LibXML, so the question
> still stands. Can I force SOAP::Lite to parse that interior XML
> string, even though it's been escaped?

No. If the XML-Schema-Type of the result element is "string", then
SOAP::Lite
(as well as other WS-packages) can treat it as a string only.

Cheers,
Martin

#6389 From: "martin.busik@..." <martin.busik@...>
Date: Thu Nov 12, 2009 6:44 pm
Subject: Re: SOAP Lite problems.
mbusik70
Offline Offline
Send Email Send Email
 
Hi,

> When I run the code with URL I get the following SOAP message returned

You can't "test" a SOAP-Webservice by entering its URL into a web browser. Use a tool
like SOAPUI (www.soapui.org)

> I am getting a undef value , what is
> the correct way to call a webservice using Perl?

As a first step, use the debugging options of SOAP::Lite, e.g.

use SOAP::Lite (+trace => [qw(transport debug parameters)]);

then you can see, what request goes to the server and what response you get.
Once you have the response, it is easier to find out what went wrong.

Cheers,
Martin

#6388 From: "kartik_sxn" <kartik.sxn@...>
Date: Thu Nov 12, 2009 10:18 am
Subject: SOAP Lite problems.
kartik_sxn
Offline Offline
Send Email Send Email
 
I am running a local StockQuoteService ,
http://localhost:8080/axis2/services/StockQuoteService?wsdl

$stockprice=SOAP::Lite ->service('http://localhost:8080/axis2/service/
StockQuoteService?wsdl') ->getPrice('IBM'); print Dumper($stockprice);
The result returns $VAR1 = undef;

I am getting a undef value , what is
the correct way to call a webservice using Perl?

When I run the code with URL I get the following SOAP message returned
<code>
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2\
005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv\
:Fault><faultcode>VersionMismatch</faultcode><faultstring>Only SOAP 1.1 or SOAP
1.2 messages are supported in the system</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>
</code>


Can somebody guide me where I am getting wrong? Which are the best modules to
parse WSDLs in Perl?

#6387 From: Wes Malone <wesdmalone@...>
Date: Tue Nov 10, 2009 1:24 am
Subject: Re: Why does Soap::Lite stop parsing this response?
wesdmalone@...
Send Email Send Email
 
It turns out SOAP::Lite was Doing The Right Thing. I'd overlooked a
note in the service docs that that said

>Note: The special characters inside <ns:return> tag are encoded to entities.
(e.g. an xml return >value will contain < characters, which will be encoded to
&lt; entities) Therefore entity decoding >is needed on the client side.

What I thought was just a trace output inconsistency was actually the
problem. SOAP::Lite being nice and unescaping the entities before they
ended up in the Dumper confused me as well. I originally included the
documentation's example because it was already formatted nicely.
Here's the actual output:
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:getVersionInfoResponse xmlns:ns="http://webservice.jchem.chemaxon">
>          <ns:return>
>             &lt;Info>
>             &lt;JChem>
>             &lt;Version>5.2.6&lt;/Version>
>             &lt;/JChem>
>             &lt;Java>
>             &lt;Vendor>Sun Microsystems Inc.&lt;/Vendor>
>             &lt;VmName>Java HotSpot(TM) Client VM&lt;/VmName>
>             &lt;Version>1.6.0_05&lt;/Version>
>             &lt;/Java>
>             &lt;Os>
>             &lt;Arch>x86&lt;/Arch>
>             &lt;Name>Windows XP&lt;/Name>
>             &lt;Version>5.1&lt;/Version>
>             &lt;/Os>
>             &lt;/Info>
>          </ns:return>
>       </ns:getVersionInfoResponse>
>    </soapenv:Body>
> </soapenv:Envelope>

Plus, everyone knows &lt; is the same as <, right? Right? ;_;

As of now I'm parsing the string with XML::LibXML, so the question
still stands. Can I force SOAP::Lite to parse that interior XML
string, even though it's been escaped?

FWIW, I'm on version 0.710.08, the newest in the Win32-Trouchelle repo.

Thanks again,
Wes

On Mon, Nov 9, 2009 at 2:55 PM, Martin Busik <martin.busik@...> wrote:
>
> Hi,
> which SOAP::Lite Version are you using?
>
> I've tried your example with 0.69 as well as with 0.710.10.
>
> The result of the 0.69 differs from the result of 0.710.10, but also differs
> from your code.
> (The difference between 0.69 and 0.710.10 is, that in 0.710.10 there is an
> instance of SOAP::Data for
> every xml element returned, i.e. for JChem, Os, Java etc, where the 0.69
> returned just getVersionInfoResponse as
> a SOAP::Data instance)
>
> Cheers,
> Martin
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: soaplite@yahoogroups.com
> > [mailto:soaplite@yahoogroups.com] Im Auftrag von Wes Malone
> > Gesendet: Montag, 9. November 2009 01:47
> > An: soaplite@yahoogroups.com
> > Betreff: [soaplite] Why does Soap::Lite stop parsing this response?
> >
> > I'm trying to write a simple SOAP client.  After making a request, the
> > response only seems to be parsed into perl data structure a couple
> > levels down.  After that it's just a string of the remaining XML. I
> > feel like it would be really kludgy to take that string and parse it
> > manually with another XML parser.
> >
> > >     my $response = $soap->getVersionInfo;
> > >     my $data = $response->dataof('//getVersionInfoResponse');
> >
> >
> > The SOAP response looks like this in the trace:
> >
> > >     <?xml version='1.0' encoding='utf-8'?>
> > >     <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > >       <soapenv:Body>
> > >         <ns:getVersionInfoResponse
> > xmlns:ns="http://webservice.jchem.chemaxon">
> > >           <ns:return>
> > >             <Info>
> > >               <JChem>
> > >                 <Version>5.2.1</Version>
> > >               </JChem>
> > >               <Java>
> > >                 <Vendor>Sun Microsystems Inc.</Vendor>
> > >                 <VmName>Java HotSpot(TM) Server VM</VmName>
> > >                 <Version>1.6.0_06</Version>
> > >               </Java>
> > >               <Os>
> > >                 <Arch>x86</Arch>
> > >                 <Name>Windows XP</Name>
> > >                 <Version>5.1</Version>
> > >               </Os>
> > >             </Info>
> > >           </ns:return>
> > >         </ns:getVersionInfoResponse>
> > >       </soapenv:Body>
> > >     </soapenv:Envelope>
> >
> > But what gets parsed into $data looks like this:
> >
> > >     \bless( {
> > >         _attr => {},
> > >         _name => "getVersionInfoResponse",
> > >         _prefix => "ns",
> > >         _signature => [],
> > >         _uri => "http://webservice.jchem.chemaxon",
> > >         _value => [
> > >           {
> > >             return =>
> > "<Info>\n<JChem>\n<Version>5.2.6</Version>\n</JChem>\n<Java>\n
> > <Vendor>Sun Microsystems Inc.</Vendor>\n<VmName>Java
> > HotSpot(TM) Client
> > VM</VmName>\n<Version>1.6.0_05</Version>\n</Java>\n<Os>\n<Arch
> > >x86</Arch>\n<Name>Windows
> > XP</Name>\n<Version>5.1</Version>\n</Os>\n</Info>\n"
> > >           }
> > >         ]
> > >       }, 'SOAP::Data' )
> >
> > This is a simple example, but for more complex responses, it could
> > become a huge hassle to have to parse out that XML.
> >
> > I found this post
> > (http://tech.groups.yahoo.com/group/soaplite/message/2641) on the
> > mailing list (from 2003!) that had a worrisome quote on it:
> >
> > >  Keep in mind the requirement that any
> > >  attributes not natively known to SOAP
> > >  must be namespace-qualified.
> >
> > And I noticed that everything that wasn't getting parsed was not
> > namespaced.  Is there a way to force SOAP::Lite to parse that
> > non-namespaced xml?  Is that even the problem?
> >
> > Thanks,
> > Wes
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>

#6386 From: "Martin Busik" <martin.busik@...>
Date: Mon Nov 9, 2009 8:55 pm
Subject: AW: Why does Soap::Lite stop parsing this response?
mbusik70
Offline Offline
Send Email Send Email
 
Hi,
which SOAP::Lite Version are you using?

I've tried your example with 0.69 as well as with 0.710.10.

The result of the 0.69 differs from the result of 0.710.10, but also differs
from your code.
(The difference between 0.69 and 0.710.10 is, that in 0.710.10 there is an
instance of SOAP::Data for
every xml element returned, i.e. for JChem, Os, Java etc, where the 0.69
returned just getVersionInfoResponse as
a SOAP::Data instance)

Cheers,
Martin


> -----Ursprüngliche Nachricht-----
> Von: soaplite@yahoogroups.com
> [mailto:soaplite@yahoogroups.com] Im Auftrag von Wes Malone
> Gesendet: Montag, 9. November 2009 01:47
> An: soaplite@yahoogroups.com
> Betreff: [soaplite] Why does Soap::Lite stop parsing this response?
>
> I'm trying to write a simple SOAP client.  After making a request, the
> response only seems to be parsed into perl data structure a couple
> levels down.  After that it's just a string of the remaining XML. I
> feel like it would be really kludgy to take that string and parse it
> manually with another XML parser.
>
> >     my $response = $soap->getVersionInfo;
> >     my $data = $response->dataof('//getVersionInfoResponse');
>
>
> The SOAP response looks like this in the trace:
>
> >     <?xml version='1.0' encoding='utf-8'?>
> >     <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> >       <soapenv:Body>
> >         <ns:getVersionInfoResponse
> xmlns:ns="http://webservice.jchem.chemaxon">
> >           <ns:return>
> >             <Info>
> >               <JChem>
> >                 <Version>5.2.1</Version>
> >               </JChem>
> >               <Java>
> >                 <Vendor>Sun Microsystems Inc.</Vendor>
> >                 <VmName>Java HotSpot(TM) Server VM</VmName>
> >                 <Version>1.6.0_06</Version>
> >               </Java>
> >               <Os>
> >                 <Arch>x86</Arch>
> >                 <Name>Windows XP</Name>
> >                 <Version>5.1</Version>
> >               </Os>
> >             </Info>
> >           </ns:return>
> >         </ns:getVersionInfoResponse>
> >       </soapenv:Body>
> >     </soapenv:Envelope>
>
> But what gets parsed into $data looks like this:
>
> >     \bless( {
> >         _attr => {},
> >         _name => "getVersionInfoResponse",
> >         _prefix => "ns",
> >         _signature => [],
> >         _uri => "http://webservice.jchem.chemaxon",
> >         _value => [
> >           {
> >             return =>
> "<Info>\n<JChem>\n<Version>5.2.6</Version>\n</JChem>\n<Java>\n
> <Vendor>Sun Microsystems Inc.</Vendor>\n<VmName>Java
> HotSpot(TM) Client
> VM</VmName>\n<Version>1.6.0_05</Version>\n</Java>\n<Os>\n<Arch
> >x86</Arch>\n<Name>Windows
> XP</Name>\n<Version>5.1</Version>\n</Os>\n</Info>\n"
> >           }
> >         ]
> >       }, 'SOAP::Data' )
>
> This is a simple example, but for more complex responses, it could
> become a huge hassle to have to parse out that XML.
>
> I found this post
> (http://tech.groups.yahoo.com/group/soaplite/message/2641) on the
> mailing list (from 2003!) that had a worrisome quote on it:
>
> >  Keep in mind the requirement that any
> >  attributes not natively known to SOAP
> >  must be namespace-qualified.
>
> And I noticed that everything that wasn't getting parsed was not
> namespaced.  Is there a way to force SOAP::Lite to parse that
> non-namespaced xml?  Is that even the problem?
>
> Thanks,
> Wes
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>

#6385 From: Wes Malone <wesdmalone@...>
Date: Mon Nov 9, 2009 12:46 am
Subject: Why does Soap::Lite stop parsing this response?
wesdmalone@...
Send Email Send Email
 
I'm trying to write a simple SOAP client.  After making a request, the
response only seems to be parsed into perl data structure a couple
levels down.  After that it's just a string of the remaining XML. I
feel like it would be really kludgy to take that string and parse it
manually with another XML parser.

>     my $response = $soap->getVersionInfo;
>     my $data = $response->dataof('//getVersionInfoResponse');


The SOAP response looks like this in the trace:

>     <?xml version='1.0' encoding='utf-8'?>
>     <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>       <soapenv:Body>
>         <ns:getVersionInfoResponse
xmlns:ns="http://webservice.jchem.chemaxon">
>           <ns:return>
>             <Info>
>               <JChem>
>                 <Version>5.2.1</Version>
>               </JChem>
>               <Java>
>                 <Vendor>Sun Microsystems Inc.</Vendor>
>                 <VmName>Java HotSpot(TM) Server VM</VmName>
>                 <Version>1.6.0_06</Version>
>               </Java>
>               <Os>
>                 <Arch>x86</Arch>
>                 <Name>Windows XP</Name>
>                 <Version>5.1</Version>
>               </Os>
>             </Info>
>           </ns:return>
>         </ns:getVersionInfoResponse>
>       </soapenv:Body>
>     </soapenv:Envelope>

But what gets parsed into $data looks like this:

>     \bless( {
>         _attr => {},
>         _name => "getVersionInfoResponse",
>         _prefix => "ns",
>         _signature => [],
>         _uri => "http://webservice.jchem.chemaxon",
>         _value => [
>           {
>             return =>
"<Info>\n<JChem>\n<Version>5.2.6</Version>\n</JChem>\n<Java>\n<Vendor>Sun
Microsystems Inc.</Vendor>\n<VmName>Java HotSpot(TM) Client
VM</VmName>\n<Version>1.6.0_05</Version>\n</Java>\n<Os>\n<Arch>x86</Arch>\n<Name\
>Windows XP</Name>\n<Version>5.1</Version>\n</Os>\n</Info>\n"
>           }
>         ]
>       }, 'SOAP::Data' )

This is a simple example, but for more complex responses, it could
become a huge hassle to have to parse out that XML.

I found this post
(http://tech.groups.yahoo.com/group/soaplite/message/2641) on the
mailing list (from 2003!) that had a worrisome quote on it:

>  Keep in mind the requirement that any
>  attributes not natively known to SOAP
>  must be namespace-qualified.

And I noticed that everything that wasn't getting parsed was not
namespaced.  Is there a way to force SOAP::Lite to parse that
non-namespaced xml?  Is that even the problem?

Thanks,
Wes

#6384 From: "Martin Busik" <martin.busik@...>
Date: Fri Oct 30, 2009 9:30 am
Subject: AW: Modifying soap:Envelope attributes
mbusik70
Offline Offline
Send Email Send Email
 
Hi,

> If the xmlns does not appear in the Envelope tag then we get
> the following error from the server:
>   org.xml.sax.SAXException: SimpleDeserializer encountered a
> child element, which is NOT expected, in something it was
> trying to deserialize.

I had a similiar problem. The XML-Schema definition contained the following
attribute:

elementFormDefault="qualified"

this causes some implementations to expect the following xml:

<ns:modEF xmlns:ns="urn:whatever>
   <ns:param1>aaa</ns:param1>
   <ns:param2>bbb</ns:param2>
</ns:modEF>

Sending just (the SOAP::Lite-Default):

<modEF xmlns="urn:whatever">
   <param1>aaa</param1>
   <param2>bbb</param2>
</modEF>

causes an error. May be, this is the same in your case.

To create the "qualified" parameters, just use:

$NS = "http://server.domain.com/model";

$proxy->serializer->ns($NS);
$prefix = $proxy->serializer->find_prefix($NS);

$obj = SOAP::Data->name("$prefix:modEF" => ...

Cheers,
Martin

#6383 From: "Martin Busik" <martin.busik@...>
Date: Thu Oct 29, 2009 11:09 pm
Subject: AW: Modifying soap:Envelope attributes
mbusik70
Offline Offline
Send Email Send Email
 
Hi,

> We have an issue trying to add an attribute to the soap:Envelope tag.
>
> The issue is that we need to add an xmlns attribute to the
> soap:Envelope tag that is generated via a call method.  I
> have found ways to add it to my top level XML tag, but not to
> modify the soap:Envelope tag.  Is there a method to do this?

a "dirty" one is:

$soap->serializer->attr->{xmlns} = "http://server.domain.com/model";

I'm wondering that that you are requesting for this, because

<soap:Envelope xmlns="http://server.domain.com/model" ...

is basically the same as

<modEF xmlns="http://server.domain.com/model"

(which you can achieve by calling
$soap->serializer->default_ns("http://server.domain.com/model"))

Where do you get problems while using the xmlns attribute on method-element
(i.e. "your" top level element)?

Cheers,
Martin

#6382 From: "taluy" <timur.taluy@...>
Date: Thu Oct 29, 2009 7:18 pm
Subject: Modifying soap:Envelope attributes
taluy
Offline Offline
Send Email Send Email
 
We have an issue trying to add an attribute to the soap:Envelope tag.

The issue is that we need to add an xmlns attribute to the soap:Envelope tag
that is generated via a call method.  I have found ways to add it to my top
level XML tag, but not to modify the soap:Envelope tag.  Is there a method to do
this?

Instead of this (that is automatically generated):

<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/">

We need this:

<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/"

  xmlns="http://server.domain.com/model"

>

The code that we are using is as follows:  Note the ns attribute to the
SOAP::Lite->new is commented out because it eventually puts the xmlns
declaration into the modEF tag in $obj rather than in the soap::Envelope.


#!/usr/bin/perl

use SOAP::Lite;
use Data::Dumper;

my $soap = SOAP::Lite->new('proxy'   => $endpoint,
                            'service' =>
"file:///home/timur/xmltest/myWSDL.wsdl",
#                          'ns'     => "http://server.domain.com/model",
                            );
my $data = getData();
my $obj = SOAP::Data
     ->name("modEF" => SOAP::Data->value(
                                                $data->{'RequestContext'},
                                                $data->{'modEFRequest'})
            )
     ->type("");
my $result = $soap->modEF($obj);
print "FAULT\n" . $result->faultstring . "\n";
print "\nRESULT\n" . $result->result . "\n";

#6381 From: Byrne Reese <byrne@...>
Date: Thu Oct 29, 2009 6:48 pm
Subject: XML Digital Signature Library
byrnereese
Offline Offline
Send Email Send Email
 
Wow,

It has been a while since I wrote to this group. Hi everyone!

I just wrote a new Perl module which I thought might be useful to
people on this list as it relates to WS-Security... XML::Sig - a
module for signing and verifying XML Digital Signatures. I am
currently using it for verifying SAML messages in OpenSSO.

http://search.cpan.org/~byrne/XML-Sig-0.2/lib/XML/Sig.pm

Anyways, that's it. Enjoy.

Byrne

#6380 From: "Joff" <joff@...>
Date: Fri Oct 23, 2009 5:53 am
Subject: [job assigment] exchange your Soap::Lite skills for beer money ;)
joff
Offline Offline
Send Email Send Email
 
<<job assignment solicitation>>

Sorry for the quasi-spam, hoping to get a hand from one of you. My startup has a
Soap API our partners use to insert orders directly into our e-commerce site.
It's a simple well documented API.

One of partners wants to use our API with PERL. I told them that we'd convert
one of PHP code samples from the API documentation into PERL. The code sample is
a bit over 30 lines.

I assumed this was super straight forward and sent over to a buddy proficient in
PERL. Alas, to my surprise he had issues getting Soap::Lite to do what he
wanted.

So ... thought one of you experts would be able to make lite work of this
assignment. I'll paypal someone $125 for their help converting my code PHP code
sample to PERL.

I'll provide the API documentation, code sample, and SOAP login credentials to
test to ensure your PERL code sample works.

If you can help us drop a note at joff@...

Thanks!
Joff

#6379 From: "Wersel, Eric" <ewersel@...>
Date: Thu Oct 15, 2009 10:05 pm
Subject: SOAP::Lite version problems w/ complex query
ericwersel
Offline Offline
Send Email Send Email
 

I am attempting to port this code to a new server install, but for some reason it's not working with a current version of SOAP::Lite. When I switch the new server to use SOAP::Lite version 0.60, it works great. Using version 0.71, the query block is nil and the call fails. As far as I can tell, the set-up looks the same as in most of the examples and archived e-mails.

Can anyone, please, see what Im doing wrong?

use SOAP::Lite;

my $soap = SOAP::Lite

        -> service("http://$ENV{'SERVER_ADDR'}/midas.wsdl")

        -> on_fault(

               sub {

                   my($soap, $res) = @_;

                   die ref $res ? $res->faultstring : $soap->transport->status, "\n";

               }

           );

sub GetCaseList()

{

  my $query_patientid     = SOAP::Data->name( 'patientID' )

                                      ->value( '1234567' )

                                      ->type( 'string' );

  my $query_caseListOrder = SOAP::Data->name( 'caseListOrder' )

                                      ->value( 'ORDER-PT-ID' )

                                      ->type( 'midas:CaseListQueryOrder' );

  my $query_offset        = SOAP::Data->name( 'offset' )

                                      ->value( 0 );

  my $query_priority      = SOAP::Data->name( 'priority' )

                                      ->value( 0 );

  my $query_sortOrder     = SOAP::Data->name( 'order' )

                                       ->value( 0 );

  my @db_caselist       = ();

  my $SOAPquery         = SOAP::Data->name( 'query' )

                                    ->value( \SOAP::Data->value( $query_patientid,

                                                                  $query_offset,

                                                                  $query_caseListOrder,

                                                                  $query_priority ) );

  @db_caselist = $soap->GetCaseList( $SOAPquery, $query_sortOrder );

 

  return @db_caselist;

}


#6378 From: "Martin Busik" <martin.busik@...>
Date: Sat Sep 12, 2009 10:29 am
Subject: AW: Multiple "Accept" tags in the HTTP Request Header
mbusik70
Offline Offline
Send Email Send Email
 
Hi,

> Please help me with answers to the following questions.
>
> 1. Are multiple/repeated "Accept" tags allowed in the HTTP
> request headers?

Yes. See http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z3

Cheers,
Martin


> 2. Is there a way to send a single "Accept" tag with values
> concatenated instead of sending multiple occurances?

Yes.

use SOAP::Lite (+trace => [ "transport" => \&rewrite_headers ]);

...

sub rewrite_headers {
     my $r = shift;
     if(UNIVERSAL::isa($r,"HTTP::Request")) {
         $r->header(Accept => "text/html; multipart/*; application/soap");
     }
}

Cheers,
Martin

#6377 From: "satheesh.uppalapati" <satheesh.uppalapati@...>
Date: Fri Sep 11, 2009 9:12 pm
Subject: Multiple "Accept" tags in the HTTP Request Header
satheesh.upp...
Offline Offline
Send Email Send Email
 
Hello All,

We have a requirement to integrate our vendor provided B2B platform with a
trading partner who uses SOAP Perl Lite client as the web service client. But we
ran into some sort of problem here. The HTTP request headers generated by the
Perl client has multiple "Accept" tags repeated as shown below and they are
being rejected by our B2B server as invalid HTTP headers.

Please help me with answers to the following questions.

1. Are multiple/repeated "Accept" tags allowed in the HTTP request headers?
2. Is there a way to send a single "Accept" tag with values concatenated instead
of sending multiple occurances?

====================
connection: TE, close;
accept: text/xml;
accept: multipart/*;
accept: application/soap;
host: test.b2bgateway.com:21250;
user-agent: SOAP::Lite/Perl/0.710.08;
content-length: 1052;
content-type: text/xml; charset=utf-8;
soapaction: http://tempuri.org/2.0/Verify;
===================


TIA
Satheesh

#6376 From: "jcroall" <jcroall@...>
Date: Sun Sep 6, 2009 3:23 pm
Subject: Array encodings: soapenc:arrayType vs a simpler format?
jcroall
Offline Offline
Send Email Send Email
 
Hello,

I'm new to SOAP and am confused about array encodings. The Java-based service
that I am trying to interact with expects the following format:

     <n1:methodA>
       <arg0>
         <streams>
           <language>CXX</language>
           <name>IProject1</name>
         </streams>
         <streams>
           <language>CXX</language>
           <name>IProject1</name>
         </streams>
         <description>My Description</description>
         <name>IProject1</name>
       </arg0>
     </n1:methodA>

But my SOAP::Lite client is generating the following:

<ws:methodA>
   <arg0>
     <name xsi:type="xsd:string">IProject1</name>
     <streams soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array">
       <item>
         <language xsi:type="xsd:string">CXX</language>
         <name xsi:type="xsd:string">IProject1</name>
         <description xsi:type="xsd:string">IProject1</description>
       </item>
       <item>
         <language xsi:type="xsd:string">CXX</language>
         <name xsi:type="xsd:string">IProject1</name>
         <description xsi:type="xsd:string">IProject1</description>
       </item>
     </streams>
     <description xsi:type="xsd:string">My Description</description>
   </arg0>
</ws:methodA>

What is the difference between the two? Is there a way to force SOAP::Lite to
use the simpler (multi-referenced?) encoding?

Thanks for your help,

- James

#6375 From: "jcroall" <jcroall@...>
Date: Sun Sep 6, 2009 3:22 pm
Subject: Array encodings: soapenc:arrayType vs a simpler format?
jcroall
Offline Offline
Send Email Send Email
 
Hello,

I'm new to SOAP and am confused about array encodings. The Java-based service
that I am trying to interact with expects the following format:

     <n1:methodA>
       <arg0>
         <streams>
           <language>CXX</language>
           <name>IProject1</name>
         </streams>
         <streams>
           <language>CXX</language>
           <name>IProject1</name>
         </streams>
         <description>My Description</description>
         <name>IProject1</name>
       </arg0>
     </n1:methodA>

But my SOAP::Lite client is generating the following:

<ws:methodA>
   <arg0>
     <name xsi:type="xsd:string">IProject1</name>
     <streams soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array">
       <item>
         <language xsi:type="xsd:string">CXX</language>
         <name xsi:type="xsd:string">IProject1</name>
         <description xsi:type="xsd:string">IProject1</description>
       </item>
       <item>
         <language xsi:type="xsd:string">CXX</language>
         <name xsi:type="xsd:string">IProject1</name>
         <description xsi:type="xsd:string">IProject1</description>
       </item>
     </streams>
     <description xsi:type="xsd:string">My Description</description>
   </arg0>
</ws:methodA>

What is the difference between the two? Is there a way to force SOAP::Lite to
use the simpler (multi-referenced?) encoding?

Thanks for your help,

- James

#6374 From: "jdawgaz" <jdawgaz@...>
Date: Thu Sep 3, 2009 6:57 pm
Subject: version 710 does not work for a webservice we connect to
jdawgaz
Offline Offline
Send Email Send Email
 
I have 710 on linux, and 55 on windows. I am connecting to the same service,
with exactly the same code, windows works, linux doesn't (the +traces are
different on both)

I need a downlevel version, but am not sure which one yet.
How do I get and install an earlier version?
I think I will start at 0.69 and go forward.

jerry

#6373 From: "pgfarr" <pgfarr@...>
Date: Tue Sep 1, 2009 2:40 pm
Subject: Re: Complex data type
pgfarr
Offline Offline
Send Email Send Email
 
Excellent! Thanks Martin, that worked.

On to new errors!!!

--- In soaplite@yahoogroups.com, "Martin Busik" <martin.busik@...> wrote:
>
> Hi,
>
> > What am I doing wrong this time? Why is the group node
> > showing up this way?
>
> SOAP::Data->name( 'ns:group' ) => value
>
> is the same as
>
> SOAP::Data->name( 'ns:group' ), value
>
> which means an empty element named 'ns:group' followed by an another
> element, which is the serialized "value".
>
> You have to use the following:
>
> SOAP::Data->name('ns:group')->value( ... )
>
> Important: the content of value must be a reference to da SOAP::Data object
> (to disable some SOAP::Lite-Type-magic), e.g.:
>
>         SOAP::Data->name( 'ns:group')->value (
>             \SOAP::Data->value(
>  	 SOAP::Data->name( "ns:active"=> 1 ),
> 	 ...
>
> So, to create the whole request, use:
>
> my $ap_response = $AP->call( SOAP::Data->name( 'ns:AddGroup' ),
>     SOAP::Data->name( 'ns:user'=> $WS_USER),
>   SOAP::Data->name( 'ns:password'=> $WS_PASSWD),
>   SOAP::Data->name( 'ns:clientTimestamp'),
>   SOAP::Data->name( 'ns:clientIP'),
>   SOAP::Data->name( 'ns:clientOSUser'),
>   SOAP::Data->name( 'ns:company'=> $COMPANY),
>         SOAP::Data->name( 'ns:group')->value (
>             \SOAP::Data->value(
>  	 SOAP::Data->name( "ns:active"=> 1 ),
>  	 SOAP::Data->name( "ns:allowDuplicates"=> 1 ),
>  	 SOAP::Data->name( "ns:description"=> 'New group' ),
>  	 SOAP::Data->name( "ns:externallyOwned"=> 1 ),
>     )
>   )
> );
>
> Cheers,
> Martin
>
>
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: soaplite@yahoogroups.com
> > [mailto:soaplite@yahoogroups.com] Im Auftrag von pgfarr
> > Gesendet: Freitag, 28. August 2009 19:21
> > An: soaplite@yahoogroups.com
> > Betreff: [soaplite] Complex data type
> >
> > I am trying to build a SOAP request with the following structure:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soap:Envelope
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:ns="http://www.alarmpoint.com/webservices/schema"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body>
> >   <ns:AddGroup>
> >     <ns:user xsi:type="xsd:string">ws_user1</ns:user>
> >     <ns:password xsi:type="xsd:string">LetMeIn</ns:password>
> >     <ns:clientTimestamp />
> >     <ns:clientIP />
> >     <ns:clientOSUser />
> >     <ns:company xsi:type="xsd:string">Default Company</ns:company>
> >
> >     <ns:group>
> >       <ns:active xsi:type="xsd:int">1</ns:active>
> >       <ns:allowDuplicates xsi:type="xsd:int">1</ns:allowDuplicates>
> >       <ns:description xsi:type="xsd:string">New group</ns:description>
> >       <ns:externallyOwned xsi:type="xsd:int">1</ns:externallyOwned>
> >       <ns:name xsi:type="xsd:string">Test Group</ns:name>
> >       <ns:observedByAll xsi:type="xsd:string" />
> >       <ns:observers xsi:type="xsd:string" />
> >       <ns:site xsi:type="xsd:string" />
> >       <ns:supervisors /><ns:timeZone xsi:type="xsd:string" />
> >       <ns:useDefaultDevices
> > xsi:type="xsd:int">1</ns:useDefaultDevices>
> >     </ns:group>
> >   </ns:AddGroup>
> > </soap:Body>
> > </soap:Envelope>
> >
> > using the following code fragment:
> >
> > my $ap_response = $SOAP->call(
> >   SOAP::Data->name( 'ns:AddGroup' ) =>
> >     SOAP::Data->name( 'ns:user'=> $WS_USER),
> >  SOAP::Data->name( 'ns:password'=> $WS_PASSWD),
> >  SOAP::Data->name( 'ns:clientTimestamp'),
> >  SOAP::Data->name( 'ns:clientIP'),
> >  SOAP::Data->name( 'ns:clientOSUser'),
> >  SOAP::Data->name( 'ns:company'=> $COMPANY),
> >  SOAP::Data->name( 'ns:group' ) =>
> > 	 SOAP::Data->name( "ns:active"=> 1 ),
> > 	 SOAP::Data->name( "ns:allowDuplicates"=> 1 ),
> > 	 SOAP::Data->name( "ns:description"=> 'New group' ),
> > 	 SOAP::Data->name( "ns:externallyOwned"=> 1 ),
> > 	 SOAP::Data->name( "ns:name" => $GROUP ),
> > 	 SOAP::Data->name( "ns:observedByAll" => '' ),
> > 	 SOAP::Data->name( "ns:observers" => '' ),
> > 	 SOAP::Data->name( "ns:site" => '' ),
> > 	 SOAP::Data->name( "ns:supervisors" ) ,
> > 	 SOAP::Data->name( "ns:timeZone" => '' ),
> > 	 SOAP::Data->name( "ns:useDefaultDevices" => 1 )
> >  );
> >
> > Unfortunately the actual XML emitted is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soap:Envelope
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:ns="http://www.alarmpoint.com/webservices/schema"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body>
> >   <ns:AddGroup>
> >     <ns:user xsi:type="xsd:string">ws_user1</ns:user>
> >     <ns:password xsi:type="xsd:string">LetMeIn</ns:password>
> >     <ns:clientTimestamp />
> >     <ns:clientIP />
> >     <ns:clientOSUser />
> >     <ns:company xsi:type="xsd:string">Default Company</ns:company>
> >     <ns:group />
> >     <ns:active xsi:type="xsd:int">1</ns:active>
> >     <ns:allowDuplicates xsi:type="xsd:int">1</ns:allowDuplicates>
> >     <ns:description xsi:type="xsd:string">New group</ns:description>
> >     <ns:externallyOwned xsi:type="xsd:int">1</ns:externallyOwned>
> >     <ns:name xsi:type="xsd:string">Test Group</ns:name>
> >     <ns:observedByAll xsi:type="xsd:string" />
> >     <ns:observers xsi:type="xsd:string" />
> >     <ns:site xsi:type="xsd:string" />
> >     <ns:supervisors /><ns:timeZone xsi:type="xsd:string" />
> >     <ns:useDefaultDevices xsi:type="xsd:int">1</ns:useDefaultDevices>
> >   </ns:AddGroup>
> > </soap:Body>
> > </soap:Envelope>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>

Messages 6373 - 6402 of 6402   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help