niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » Perl
SOAP::Lite and complex client call parameter
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
gelbeiche
*nix forums beginner


Joined: 23 Apr 2005
Posts: 17

PostPosted: Thu Jul 20, 2006 7:37 pm    Post subject: SOAP::Lite and complex client call parameter Reply with quote

Hi,

I use SOAP::Lite for a client to call some Java-based webservices.
All is fine as long as the signature of the webservice use simple
parameters.
But now I have to call a webservice which has an parameter that is an
array of complex data (in C I would say an array of structs, in Java
it is called array of valueobjects).
Actually it is an order with some order details. The raw XML-picture
would look like:
<order>
<customernumber>1</customernumber>
<company>2</company>
<orderdetails>
<orderdetail>
<...> //some order detail data here
<orderdetail>
<orderdetail>
<...> //some order detail data here
<orderdetail>
</orderdetails>
</order>

The customernumber and company are simple data types,
the orderdetails are an array of orderdetail.

I tried the following:
my $soap_response = SOAP::Lite
-> proxy($webservice_address)
-> uri($uri)
->
receiveOrder(SOAP::Data->type(string=>"my_externelCustNo")->name('string'),
SOAP::Data->type(string=>"my_externalOrderNo")->name('string0'),
SOAP::Data->type(byte=>1)->name('byteVal'),
SOAP::Data->type(byte=>2)->name('byteVal0'),
SOAP::Data->type(byte=>3)->name('byteVal1'),
SOAP::Data->name(orderDetailVOs=>"<orderDetailVOs
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\"
xmlns:n1=\"java:valueobjects.shared.online\"
soapenc:arrayType=\"n1:OrderDetailVO[1]\">
<OrderDetailVO xsi:type=\"n1:OrderDetailVO\">
<comunicatedDeliveryType
xsi:type=\"xsd:byte\">1</comunicatedDeliveryType> <confirmationID
href=\"#ID_4\"> </confirmationID>
<itemNumber xsi:type=\"xsd:int\">100</itemNumber>
<orderType xsi:type=\"xsd:byte\">1</orderType>
<paymentCondition href=\"#ID_4\"> </paymentCondition>
<promotion href=\"#ID_4\"></promotion>
<quantity xsi:type=\"xsd:int\">100</quantity>
<sellingPrice xsi:type=\"xsd:int\">100</sellingPrice>
<size href=\"#ID_4\"> </size>
</OrderDetailVO> <xsd:string xsi:type=\"xsd:string\"
id=\"ID_4\">sample string</xsd:string>
</orderDetailVOs>"));

When I call the webservice I get no error. When I look at the webservice
server side I see that the simple data are properly transmitted to the
server but the data in the XML structure are not.
The method at Java side which is called has a signature:

int receiveOrder(String extCustNo, String
extOrderNo, ...,OrderDetailVO[] orderDetails);

and when I access the orderDetails-array it contains no values.

What I'm doing wrong and where can I find an client example which uses
arrays of data structures ?

Thomas
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Mon Dec 01, 2008 8:15 pm | All times are GMT
navigation Forum index » Programming » Perl
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Postfix SMTP client issues damber Postfix 1 Sat Apr 19, 2008 11:33 am
No new posts Problem while accessing 64 bit Server thru 32 bit client Ganesh Server 0 Fri Jul 21, 2006 1:40 pm
No new posts Arbitrary function with parameter darknails@gmail.com C++ 2 Fri Jul 21, 2006 9:58 am
No new posts Anti-uce client checks Ian Andrews Postfix 2 Fri Jul 21, 2006 3:22 am
No new posts can I call a internal function directly? minrobin@gmail.com shell 2 Fri Jul 21, 2006 2:17 am

Xbox Mod Chip | Payday Loan | Mortgage Calculator | Loans | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1720s ][ Queries: 16 (0.1010s) ][ GZIP on - Debug on ]