Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

soaplite · SOAP::Lite for Perl (soaplite.com)

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1205
  • Category: Protocols
  • Founded: Jan 28, 2001
  • Language: English
? 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.

Messages

Advanced
Messages Help
Messages 4557 - 4590 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4557 From: "Andrew Hicox" <andrew@...>
Date: Mon Apr 11, 2005 1:24 pm
Subject: named function arguments
ahicox
Send Email Send Email
 
Hello everyone:

I'm writing some services using Soap::Lite, and I need to be able to
have named arguments to my subroutines.

In regular perl syntax I's do something like:

sub mySub {
     my %args = @_;
     ...
}

mySub (arg1 => "value1", arg2 => "value2");


in Soap::Lite, I've discovered I can acheive this behaviour by
enclosing the arguments in a secondary structure in the request body,
something like:

<SOAP-ENV:Body>
     <namesp1:mySub xmlns:namesp1="mySub">
         <myArbitraryStruct>
             <arg1 xsi:type="xsd:string">value1</arg1>
             <arg2:type="xsd:string">value2</arg2>
         </myArbitraryStruct>
     </namesp1:mySub>
</SOAP-ENV:Body>

doing this in a Soap::Lite client is fairly trivial, however, the
people that'll be using my service are writing java and php clients,
and are not to fond of <myArbitraryStuct> type situations.

I'd much rather take the arguments inline in the body without the
enclosing structure (delete <myArbitraryStuct> and
</myArbitraryStruct> above).

Is there any way for me to snag the names of the arguments inside my
perl module without having to write my own custom deserializer?

if I've got to write a deserializer, are there any *good* tutorials
out there you all would suggest?

thank you,

-Andrew

#4558 From: "Jay A. Kreibich" <jak@...>
Date: Mon Apr 11, 2005 3:02 pm
Subject: Re: Re: Accessing SOAP::Header
jaykreibich
Send Email Send Email
 
On Mon, Apr 11, 2005 at 12:41:49PM -0000, jameshargreavesgmail scratched on the
wall:
>
> Thanks - but I still can't access the header! If I perform the

> Why am I not able to access the envelope as you suggest?

   The server function "soapimport" needs to be part of a package that
   is derived (e.g., has an @ISA value) from the SOAP::Lite package
   'SOAP::Server::Parameters'.  This clues in SOAP::Lite to append the
   SOAP::SOM object as the last argument.

   Once you have a reference to the SOM object, you can extract the
   headers in to a hash with the call "headers".  Example:

----------------------------------------------------------------------

package mySoapPackage;
our( @ISA ) = ( 'SOAP::Server::Parameters' );

[...]

sub soapimport
{
	 my( $class ) = shift( @_ );
         my( $som ) = pop( @_ );
         my( $hdr ) = $som -> header( );
	 my( $ck ) = $hdr -> {'check'};

	 # $ck is a scalar string value, not a SOAP::Data object

	 [...]
}

----------------------------------------------------------------------

   The SOM object can also be used to extract named parameters and other
   elements of the transaction.

    -j

--
                      Jay A. Kreibich | CommTech, Emrg Net Tech Svcs
                         jak@... | Campus IT & Edu Svcs
           <http://www.uiuc.edu/~jak> | University of Illinois at U/C

#4559 From: "Jay A. Kreibich" <jak@...>
Date: Mon Apr 11, 2005 3:09 pm
Subject: Re: named function arguments
jaykreibich
Send Email Send Email
 
On Mon, Apr 11, 2005 at 01:24:08PM -0000, Andrew Hicox scratched on the wall:
>
>
> Hello everyone:
>
> I'm writing some services using Soap::Lite, and I need to be able to
> have named arguments to my subroutines.

> Is there any way for me to snag the names of the arguments inside my
> perl module without having to write my own custom deserializer?

   See the thread on Accessing the SOAP::Header.

   Basically you need to have your server classes derived from
   SOAP::Server::Parameters.  This will provide the SOAP::SOM object to
   each function call as the last argument.  You can then extract the
   full SOAP::Data members for headers and parameters from this object,
   including name and type information.

   If you need to do this for every function call, I would suggest
   writing a helper function that takes a SOM object and just extracts
   all the headers, so you can do something like this:

sub mySoapCall
{
	 my( %args ) = myHelperPkg::ExtractParaters( pop( @_ ) );
	 [...]
}


    -j

--
                      Jay A. Kreibich | CommTech, Emrg Net Tech Svcs
                         jak@... | Campus IT & Edu Svcs
           <http://www.uiuc.edu/~jak> | University of Illinois at U/C

#4564 From: "§hõbhãñ™" <show2sh@...>
Date: Tue Apr 12, 2005 7:32 am
Subject: Preserve the sequence of xml elements in the generated SOAP Envelope
show2sh
Send Email Send Email
 
Hi,
I'm generating and sending a SOAP envelope to the server, but when the client
is executed I see that the XML elements in the generated SOAP envelope are not
in order as I expect.

I was expecting the XML elements something in this order:


<?xml version="1.0" encoding="utf-8"?>
<MessageHeader>

<AgreementId>urn:xxx-xxx:::</AgreementId>
<ConversationId>20050904-13:30:03.469-8572</ConversationId>

<Sequence>
<Id>What id is this?</Id>
<Number>123</Number>
<Total>6</Total>
</Sequence>

<Service>
<type>service.type. what servicetype is this?</type>
</Service>

<Action>Problem Submit</Action>

<MessageData>
<MessageId>20050904-13:30:03.469-8572@...</MessageId>
<Timestamp>2005-0409T12:10:42</Timestamp>
<RefToMessageId>Which reference is this?</RefToMessageId>
<TimeToLive>2005-0409T12:10:42</TimeToLive>
</MessageData>

<Description>This is the message header</Description>

<ErrorList>
<Error>
<Description> Error Description</Description>
<codeContent>code content</codeContent>
<errorCode>Error Code</errorCode>
<severity>severity.type</severity>
<location>error location</location>
</Error>
<highestSeverity>severity.type</highestSeverity>
</ErrorList>

<id>which id is this?</id>
</MessageHeader>


But the generated SOAP envelope comes out as below:

<?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:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetbyName xmlns="urn:Delivery">
<MessageHeader xmlns="urn:MsgHeader">

<MessageData>
<Timestamp>2005-04-08T14:29:37</Timestamp>
<RefToMessageId>Which reference is this</RefToMessageId>
<TimeToLive>2005-04-08T14:29:37</TimeToLive>
<MessageId>20050904-13:30:03.469-8572@...</MessageId>
</MessageData>

<ErrorList>
<Error>
<location>error location</location>
<errorCode>Error Code</errorCode>
<codeContent>code content</codeContent>
<severity>severity.type</severity>
<Description>Error Description</Description>
</Error>
</ErrorList>

<Service>
<type>service.type. What servicetype is this?</type>
</Service>
<highestSeverity>severity.type</highestSeverity>
<AgreementId>urn:xxx-xxxx:::</AgreementId>
<Action>Problem Submittal</Action>
<id>Which id is this</id>

<Sequence>
<Total>6</Total>
<Number>123</Number>
<Id>What id is this</Id>
</Sequence>

</MessageHeader>
</GetbyName>
</soap:Body>
</soap:Envelope>


How do I preserve the order of XML elements in the generated SOAP envelope
(both on client/server side). like

<MessageHeader>
<AgreementId>...
<ConversationId>...

<Sequence>
<Id>...
<Number> ...

Many thanks
/ S \




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

#4565 From: "Graham Irvine" <graham@...>
Date: Wed Apr 13, 2005 4:03 am
Subject: Overriding Envelope Attributes
graham23sk
Send Email Send Email
 
Hi

Using SOAP::Lite as a client can I manipulate the Envelope Attributes
easily .

i.e

SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
xmlns:namesp1="http://namespaces.soaplite.com/perl">

I tried a simple $soap->({attr => ...}) but it didnt seem to work
as expected.

Its to satisfy an interop empasse regarding some slight diffs in these
values and an additional attribute of xmlns:si.

Thanks
Graham

#4566 From: Byrne Reese <byrne@...>
Date: Wed Apr 13, 2005 2:24 pm
Subject: Re: Overriding Envelope Attributes
byrnereese
Send Email Send Email
 
In SOAP::Lite 0.60 and 0.65, you can easily add a new namespace to the
envelope using the following:

$soap->serializer->register_ns("http://uri","myprefix")

Graham Irvine wrote:

>
> Hi
>
> Using SOAP::Lite as a client can I manipulate the Envelope Attributes
> easily .
>
> i.e
>
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
> xmlns:namesp1="http://namespaces.soaplite.com/perl">
>
> I tried a simple $soap->({attr => ...}) but it didnt seem to work
> as expected.
>
> Its to satisfy an interop empasse regarding some slight diffs in these
> values and an additional attribute of xmlns:si.
>
> Thanks
> Graham
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
> *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/>.
>
>

#4567 From: Cristina Aurrecoechea <aurreco@...>
Date: Wed Apr 13, 2005 11:10 pm
Subject: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" generates duplications
aurreco
Send Email Send Email
 
I have a SOAP::Lite (0.65beta2.1) client using a
simple Axis (1.2RC2) service. The service has only one
method (getNameList()) and returns an array of 4
strings.

WHen executing the client, the SOAP response received
has a duplicated attribute in the SOAP body generated
by Axis in the <getNameListReturn ...  >
    xsi:type="soapenc:Array" xsi:type="soapenc:Array"

As a result the parser in client side complains.

By using tcpmon I see that at the client side
SOAP::Lite generates a SOAP request using in the
envelope:
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
IF I change the XMLSchema above to 2001, the response
turns out correct!, with no duplications.

My questions are:

- can I tell SOAP::Lite to use the 2001 schema instead
of the 1999, how?

- is this because my client is using SOAP1.1 instead
of SOAP1.2, and if so how do I tell it to use SOAP1.2?

- is this an interoperability problem between
SOAP::Lite and Axis?

- SHould I download the latest SOAP::Lite
(0.65-beta4)?

Thanks
Cristina

#4568 From: "Graham Irvine" <graham@...>
Date: Thu Apr 14, 2005 3:08 am
Subject: Re: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" generates duplications
graham23sk
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Cristina Aurrecoechea <aurreco@y...>
wrote:
> I have a SOAP::Lite (0.65beta2.1) client using a
> simple Axis (1.2RC2) service. The service has only one
> method (getNameList()) and returns an array of 4
> strings.
>
> WHen executing the client, the SOAP response received
> has a duplicated attribute in the SOAP body generated
> by Axis in the <getNameListReturn ...  >
>    xsi:type="soapenc:Array" xsi:type="soapenc:Array"
>
> As a result the parser in client side complains.
>
> By using tcpmon I see that at the client side
> SOAP::Lite generates a SOAP request using in the
> envelope:
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> IF I change the XMLSchema above to 2001, the response
> turns out correct!, with no duplications.
>
> My questions are:
>
> - can I tell SOAP::Lite to use the 2001 schema instead
> of the 1999, how?

The only way so far i have found to do this is to create my own
serializer namespaces like this .

$soap->serializer->namespaces({"http://schemas.xmlsoap.org/soap/encoding/"=>"SOA\
P-ENC",

"http://schemas.xmlsoap.org/soap/envelope/"=>"SOAP-INV",
                                "http://www.w3.org/2001/XMLSchema"=>"xsd",

"http://www.w3.org/2001/XMLSchema-instance"=>"xsi"});

However ..

Your post has just blown my theory that these two xsi's were
interchangeable :(

If it will work for you I guess use it. But now i am more than ever
wanting to know what these namespace attributes affect.


> - is this because my client is using SOAP1.1 instead
> of SOAP1.2, and if so how do I tell it to use SOAP1.2?


I've tried setting this also without any joy using variants of

$soap->serializer->soapversion(1.2);
and
$SOAP::Constant::SOAP_VERSION = 1.2;


> - is this an interoperability problem between
> SOAP::Lite and Axis?
>
> - SHould I download the latest SOAP::Lite
> (0.65-beta4)?

It doesnt change the handling of SOAP::Constants as far as I can see
over your current version , or the namespace handling but as you are
running beta anyway I guess you should.

> Thanks
> Cristina

#4569 From: "Graham Irvine" <graham@...>
Date: Thu Apr 14, 2005 3:09 am
Subject: Re: Overriding Envelope Attributes
graham23sk
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Byrne Reese <byrne@m...> wrote:
> In SOAP::Lite 0.60 and 0.65, you can easily add a new namespace to the
> envelope using the following:
>
> $soap->serializer->register_ns("http://uri","myprefix")

That doesnt work with 0.60a (CPAN version). It does however work with
0.65_beta4 so may be of use in the future.

However your post did help me with my add an envelope attribute since
it showed me why i was not getting my new attribute added . Thus

$soap->serializer->attr({"xmlns:si"=>"http://soapinterop.org/xsd",
"xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance"});

Half way there .. the second attribute is obviously re-written again
for the soap call.

I am not really sure of the value of this but whilst i am not posting
the "same" envelope attributes as there "native" client im being asked
to mimic its not open and shut that a problem with soap service is
there end.

Maybe someone can explain exactly why SOAP::Lite uses the xsi it does
  where everywhere else uses the 2001 URL yet still being SOAP 1.1. and
if its relevant ..

My own feeling here is most client and serverware here pursuit there
own limits and interop capabilitys and this sort of thing is paid
lipservice at best , or am i very wrong and just suffering from soap
interop fatigue <laughs> ?

Ive amended the SOAP::Constant value to the one specified and tested
every webservice i can think of and it has not made any difference in
the response. Those that work still work . those that dont still dont .
Graham


> Graham Irvine wrote:
>
> >
> > Hi
> >
> > Using SOAP::Lite as a client can I manipulate the Envelope Attributes
> > easily .
> >
> > i.e
> >
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
> > xmlns:namesp1="http://namespaces.soaplite.com/perl">
> >
> > I tried a simple $soap->({attr => ...}) but it didnt seem to work
> > as expected.
> >
> > Its to satisfy an interop empasse regarding some slight diffs in these
> > values and an additional attribute of xmlns:si.
> >
> > Thanks
> > Graham
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
------------------------------------------------------------------------
> > *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/>.
> >
> >

#4570 From: Ivan Venuti <ivanvenuti@...>
Date: Thu Apr 14, 2005 2:11 pm
Subject: New to SOAP::Lite: can't use a WS written in Java with Axis...
ivanvenuti
Send Email Send Email
 
I'm new to Perl and I've written a Web Servis in Java
using Axis 1.2Rc3
I've installed SOAP:Lite (with MIME::Parser 6.01) and
I'd like to write a Perl client for WS described at
http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl
But I'm unable to retrieve any result. Here is my
code:

use strict;
use SOAP::Lite;

use Data::Dumper;
  my $soap=SOAP::Lite->
service('http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl');
  my $val=$soap->productsList('1970-10-12');
print Dumper($val);

anyone can help me? Thanks a lot!

Ivan



___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4571 From: Robert Nicholson <robert@...>
Date: Thu Apr 14, 2005 2:31 pm
Subject: AMZN web services and the $result
robertatelas...
Send Email Send Email
 
Does anybody know why Amazon requires you to walk the SOM to get
meaningful results?

In the past I was able to get what I need directly from the Result but
now I'm required to walk the SOM

What has changed?

#4572 From: Byrne Reese <byrne@...>
Date: Thu Apr 14, 2005 3:07 pm
Subject: Re: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" generates duplications
byrnereese
Send Email Send Email
 
Cristina Aurrecoechea wrote:

> - can I tell SOAP::Lite to use the 2001 schema instead
> of the 1999, how?

It should be defaulting to 2001 now. Weird that it is not.

>
> - is this because my client is using SOAP1.1 instead
> of SOAP1.2, and if so how do I tell it to use SOAP1.2?

Yes. $soap->soapversion(1.2);

>
> - is this an interoperability problem between
> SOAP::Lite and Axis?

Only when using attachments, but there is a fix.

>
> - SHould I download the latest SOAP::Lite
> (0.65-beta4)?


Yes.

>
> Thanks
> Cristina
>
>
> ------------------------------------------------------------------------
> *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/>.
>
>

#4573 From: "jmglov027" <josh.glover@...>
Date: Thu Apr 14, 2005 3:45 pm
Subject: Can't use string ("as_anyURI") as a subroutine ref
jmglov027
Send Email Send Email
 
Long time lurker, first time poster here. Hullo to the group!

I have been using SOAP::Lite for about a year and a half now, first
0.55, then 0.60. I just upgraded to 0.65_4 on a test box, and ran into
major breakage. Making a SOAP call now results in the following fault:

soap:Client (Can't use string ("as_anyURI") as a subroutine ref while
"strict refs" in use at
/usr/local/lib/perl5/site_perl/5.8.3/SOAP/Lite.pm line 1076. )

I am running SOAP::Lite under Apache + mod_perl. Looking at my
application logfiles, I can see that the SOAP call succeeds as far as
the application is concerned, so the issue must be with serialisation
of the result. I looked at line 1076 of SOAP/Lite.pm, but without some
deep digging, I don't think I am going to be able to figure this one
out.

Does this ring any bells with anyone else on this list? (Especially
Byrne and Pavel/Paul?)

TIA,
Josh

#4574 From: Alex Pena <alex@...>
Date: Thu Apr 14, 2005 4:51 pm
Subject: Re: New to SOAP::Lite: can't use a WS written in Java with Axis...
bigel0w21
Send Email Send Email
 
Try using trace=>'all' to help debug your client. It looks like you are
sending data that is not expected on the server.

Used the following to test it:
-----------------------------------------------
#!/usr/bin/perl -w
use warnings;
use SOAP::Lite
trace=>'all',
;

$proxy =
'http://www.caribel.it:8080/axis/services/ProductsExampleWSPort';
$uri = 'ProductsExampleWS';

#$data = (SOAP::Data->name('lastUpdateDate' => "1970-10-12"));

$soap = new SOAP::Lite(proxy=>$proxy,uri=>$uri,readable=>'true',);
$result = $soap->productsList('1970-10-12');

if ($result->fault){
          print "-----------------------------------------\n";
          print "Fault :", $result->faultstring, "\n";
          print "Faultcode :",$result->faultcode, "\n";
          print "Faultdetail :", %{$result->faultdetail}, "\n";
   } else {
          foreach my $field ($result->valueof("//productsListResponse")) {
                  print "\n";
                  foreach my $field_name (sort keys %{$field}) {
                          print $field_name, ": '",
$field->{$field_name}, "'\n";
                  }
                  print "\n";
          }
}
---------------------------------------------
Also tried it with:
$data = (SOAP::Data->name('lastUpdateDate' => "1970-10-12"));
$soap = new SOAP::Lite(proxy=>$proxy,uri=>$uri,readable=>'true',);
$result = $soap->productsList($data);

Both returned:
------------
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:
Body><soapenv:Fault><faultcode>soapenv:Server.userException</
faultcode><faultstring>org.xml.sax.SAXException: SimpleDeserializer
encountered a child element, which is NOT expected, in something it was
trying to deserialize.</faultstring><detail><ns1:hostname
xmlns:ns1="http://xml.apache.org/axis/">alpha</ns1:hostname></detail></
soapenv:Fault></soapenv:Body></soapenv:Envelope>
------------

I'm still a n00b but  trace has helped me alot. Good luck.

Alex,

On Apr 14, 2005, at 7:11 AM, Ivan Venuti wrote:

> I'm new to Perl and I've written a Web Servis in Java
>  using Axis 1.2Rc3
>  I've installed SOAP:Lite (with MIME::Parser 6.01) and
>  I'd like to write a Perl client for WS described at
> http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl
>  But I'm unable to retrieve any result. Here is my
>  code:
>
>  use strict;
>  use SOAP::Lite;
>
>  use Data::Dumper;
>  my $soap=SOAP::Lite->
>
> service('http://www.caribel.it:8080/axis/services/
> ProductsExampleWSPort?wsdl');
>  my $val=$soap->productsList('1970-10-12');
>  print Dumper($val);
>
>  anyone can help me? Thanks a lot!
>
>  Ivan
>
>
>             
>  ___________________________________
>  Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar,
> Webcam, Giochi, Rubrica… Scaricalo ora!
> http://it.messenger.yahoo.it
>
>
> 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
>  
>  • 	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>

#4575 From: Cristina Aurrecoechea <aurreco@...>
Date: Thu Apr 14, 2005 7:35 pm
Subject: Re: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" generates duplications
aurreco
Send Email Send Email
 
Thanks for the replies.
Graham solution works, and I get a good SOAP response.

Byrne, changing the SOAP version does not work.

Now I have a different problem. Any pointers are
appreciated.

As I said when I execute:
      $result = $soap->getNameList();
I get a perfect SOAP response with the four strings in
the array:
.........<getNameListReturn
soapenc:arrayType="soapenc:string[4]"
xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item
xsi:type="soapenc:string">Melon</item>.........

But when I want to print $result; I get an unblessed
reference ARRAY(0x85780a4)

If I use an array
  @result=$soap->getNameList();
  print @result;
I get the number 1 (?).

I am new to Perl. Thanks in advance.
Cristina






--- Graham Irvine <graham@...> wrote:
>
> --- In soaplite@yahoogroups.com, Cristina
> Aurrecoechea <aurreco@y...>
> wrote:
> > I have a SOAP::Lite (0.65beta2.1) client using a
> > simple Axis (1.2RC2) service. The service has only
> one
> > method (getNameList()) and returns an array of 4
> > strings.
> >
> > WHen executing the client, the SOAP response
> received
> > has a duplicated attribute in the SOAP body
> generated
> > by Axis in the <getNameListReturn ...  >
> >    xsi:type="soapenc:Array"
> xsi:type="soapenc:Array"
> >
> > As a result the parser in client side complains.
> >
> > By using tcpmon I see that at the client side
> > SOAP::Lite generates a SOAP request using in the
> > envelope:
> >
>
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > IF I change the XMLSchema above to 2001, the
> response
> > turns out correct!, with no duplications.
> >
> > My questions are:
> >
> > - can I tell SOAP::Lite to use the 2001 schema
> instead
> > of the 1999, how?
>
> The only way so far i have found to do this is to
> create my own
> serializer namespaces like this .
>
>
$soap->serializer->namespaces({"http://schemas.xmlsoap.org/soap/encoding/"=>"SOA\
P-ENC",
>
>
"http://schemas.xmlsoap.org/soap/envelope/"=>"SOAP-INV",
>
> "http://www.w3.org/2001/XMLSchema"=>"xsd",
>
>
"http://www.w3.org/2001/XMLSchema-instance"=>"xsi"});
>
> However ..
>
> Your post has just blown my theory that these two
> xsi's were
> interchangeable :(
>
> If it will work for you I guess use it. But now i am
> more than ever
> wanting to know what these namespace attributes
> affect.
>
>
> > - is this because my client is using SOAP1.1
> instead
> > of SOAP1.2, and if so how do I tell it to use
> SOAP1.2?
>
>
> I've tried setting this also without any joy using
> variants of
>
> $soap->serializer->soapversion(1.2);
> and
> $SOAP::Constant::SOAP_VERSION = 1.2;
>
>
> > - is this an interoperability problem between
> > SOAP::Lite and Axis?
> >
> > - SHould I download the latest SOAP::Lite
> > (0.65-beta4)?
>
> It doesnt change the handling of SOAP::Constants as
> far as I can see
> over your current version , or the namespace
> handling but as you are
> running beta anyway I guess you should.
>
> > Thanks
> > Cristina
>
>
>
>

#4576 From: "Graham Irvine" <graham@...>
Date: Fri Apr 15, 2005 10:24 am
Subject: Re: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" generates duplications
graham23sk
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Cristina Aurrecoechea <aurreco@y...>
wrote:
> Thanks for the replies.
> Graham solution works, and I get a good SOAP response.
>
> Byrne, changing the SOAP version does not work.
>
> Now I have a different problem. Any pointers are
> appreciated.
>
> As I said when I execute:
>      $result = $soap->getNameList();
> I get a perfect SOAP response with the four strings in
> the array:
> .........<getNameListReturn
> soapenc:arrayType="soapenc:string[4]"
> xsi:type="soapenc:Array"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item
> xsi:type="soapenc:string">Melon</item>.........
>
> But when I want to print $result; I get an unblessed
> reference ARRAY(0x85780a4)
>
> If I use an array
>  @result=$soap->getNameList();
>  print @result;
> I get the number 1 (?).
>

Im not a "perl monk" so someone might correct me here . But the reason
for this is that the $soap call returns a scalar reference to the
array .. so it returns 1 when you try to print it as above.

what you need to do depends on the data coming back . I suggest
turning tracing on to help you here whilst you get it working.

so use SOAP::Lite +trace => all;

then after

$result = $soap->getNamelist();

you should do something like this

while (@$result) {
    $item = shift @$result;
    print "$item\n";
}

NB: If $item is a hash print "$item->{elementname}\n";

If the $result is nested which in the case of an arraytype i think it
might be , you can get down to the actual array of returned values
using a variant of this to get to the top xml element you want.

The trace output of the response will be invaluable here to determine
what you need to do.

$returns = $result->valueof('//GetNameListResponse/return');
while (@$returns){
     $item = shift @$result;
     print "$item\n";
}

Regards
Graham

#4577 From: Ivan Venuti <ivanvenuti@...>
Date: Fri Apr 15, 2005 10:54 am
Subject: Re: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
ivanvenuti
Send Email Send Email
 
thanks to anyone who has written.

The error is:

Fault :org.xml.sax.SAXException: SimpleDeserializer
encountered a child
element, which is NOT expected, in something it was
trying to
deserialize.
Faultcode :soapenv:Server.userException
Faultdetail :hostnamealpha

So there is some problem in the message.
I've tested the message arrived from Perl client:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"


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:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <namesp1:productsList
xmlns:namesp1="ProductsExampleWS">
       <c-gensym3
xsi:type="xsd:date">1970-10-12</c-gensym3>
     </namesp1:productsList>
   </soap:Body>
</soap:Envelope>


This is one (good) generated by an axis client:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ElementDate
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
</soapenv:Body>
</soapenv:Envelope>

(generated correctly from the WSDL locate at the
public site

http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl)
I'm using document/literal...


-- Ivan





___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4578 From: "Graham Irvine" <graham@...>
Date: Fri Apr 15, 2005 12:11 pm
Subject: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
graham23sk
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Ivan Venuti <ivanvenuti@y...> wrote:
> thanks to anyone who has written.
>
> The error is:
>
> Fault :org.xml.sax.SAXException: SimpleDeserializer
> encountered a child
> element, which is NOT expected, in something it was
> trying to
> deserialize.
> Faultcode :soapenv:Server.userException
> Faultdetail :hostnamealpha
>
> So there is some problem in the message.
> I've tested the message arrived from Perl client:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
>
> 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:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <namesp1:productsList
> xmlns:namesp1="ProductsExampleWS">
>       <c-gensym3
> xsi:type="xsd:date">1970-10-12</c-gensym3>
>     </namesp1:productsList>
>   </soap:Body>
> </soap:Envelope>
>
>
> This is one (good) generated by an axis client:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
>
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ElementDate
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
> </soapenv:Body>
> </soapenv:Envelope>

This should create the same soap request as the Axis Client.

====
use SOAP::Lite;

# Your Variables - set accordingly
my $proxy='http://www.yourwebserviceurl.com/blahblah.wsdl';
my $uri='http://invenuti.altervista.org/ProductExamlpeWS.xsd1';
my $date = "2005-04-11";

my $soap = SOAP::Lite
         ->uri($uri)
         ->on_action( sub {join '/',$uri,$_[1]} )
         ->proxy($proxy);

my $method=SOAP::Data->name('productsList')
                     ->attr({xmlns => $uri});

my @params;

my $request= SOAP::Data
                 ->name(ElementDate)->value($date)->type('string');

push @params,$request;

my $result = $soap->call($method => @params);

if ($result->fault){
     print $result->faultstring;
}
else{
     print $result->result;
}

#4579 From: Cristina Aurrecoechea <aurreco@...>
Date: Fri Apr 15, 2005 4:05 pm
Subject: Re: Re: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" generates duplications
aurreco
Send Email Send Email
 
THANKS!

this is clearly my not understanding Perl.
I was already using trace but I could not figure out
how to extract the array from the unblessed reference.

Your solution works beautifully!!!

>
> $result = $soap->getNamelist();
>
> you should do something like this
>
> while (@$result) {
>    $item = shift @$result;
>    print "$item\n";
> }
>

#4580 From: Ivan Venuti <ivanvenuti@...>
Date: Fri Apr 15, 2005 4:21 pm
Subject: Fwd: Re: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
ivanvenuti
Send Email Send Email
 
ops... I've done "reply" and I've send email to Graham
instead of the group, sorry...

> > This should create the same soap request as the
> Axis
> Client.
>
> I've modified only some lines (in particular I've
> sent
> a date and not a string, in order to match the xsd
> type):
>
>
> use strict;
> use SOAP::Lite +trace => qw (debug);
>
> # Your Variables - set accordingly
> my
>
$proxy='http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl';
> my
>
$uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
> my $date = "2005-04-11";
>
> my $soap = SOAP::Lite
> ->uri($uri)
> ->on_action( sub {join '/',$uri,$_[1]} )
> ->proxy($proxy);
>
> my
>
$method=SOAP::Data->name('productsList')->attr({xmlns
> => $uri});
>
> my @params;
>
> my $request=
>
SOAP::Data->name('ElementDate')->value($date)->type('date');
>
> push @params,$request;
>
> my $result = $soap->call($method => @params);
>
> if ($result->fault){
> print $result->faultstring;
> }
> else{
> print $result->result;
> }
>
>
> Unfortunatly I can see that the generated SOAP
> massage
> isn't equal to the one generated by Axis; here is
> the
> trace of the error:
>
>
>
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://www.caribel.it:8080/axi
> s/services/ProductsExampleWSPort?wsdl HTTP/1.1
> Accept: text/xml
> Accept: multipart/*
> Accept: application/soap
> Content-Length: 514
> Content-Type: text/xml; charset=utf-8
> SOAPAction:
>
http://ivenuti.altervista.org/ProductsExampleWS.xsd1/productsList
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> xmlns:xsi="http://www.w3.or
> g/2001/XMLSchema-instance"
>
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
> ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:soap="http://schemas.xmlsoap.org/soap/env
> elope/">
> <soap:Body><productsList
> xmlns="http://ivenuti.altervista.org/ProductsEx
> ampleWS.xsd1"><ElementDate
>
xsi:type="xsd:date">2005-04-11</ElementDate></product
> sList></soap:Body></soap:Envelope>
> SOAP::Transport::HTTP::Client::send_receive:
> HTTP/1.1
> 500 Internal
> Server Error
> Connection: close
> Date: Fri, 15 Apr 2005 16:08:02 GMT
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Client-Date: Fri, 15 Apr 2005 16:06:42 GMT
> Client-Peer: 151.4.110.70:8080
> Client-Response-Num: 1
>
> <?xml version="1.0"
> encoding="utf-8"?><soapenv:Envelope
> xmlns:soapenv="http://sc
> hemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" x
>
mlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Faul
>
t><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SA
> XException: SimpleDeserializer encountered a child
> element, which is
> NOT
> expected, in something it was trying to
> deserialize.</faultstring><detail><ns1:hostname
>
xmlns:ns1="http://xml.apache.org/axis/">alpha</ns1:hostname></detail></soapenv:
> Fault></soapenv:Body></soapenv:Envelope>
> org.xml.sax.SAXException: SimpleDeserializer
> encountered a child element, which
> is NOT expected, in something it was trying to
> deserialize.
>
>
> This is the SOAP message from Axis client:
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
>
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ElementDate
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I think that the problem is inside the body;infact
> the
> perl one is:
>
>
> <soap:Body>
> <productsList
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">
> <ElementDate
>
xsi:type="xsd:date">2005-04-11</ElementDate></productsList>
> </soap:Body>
>
> while the Axis one is without the element
> productsList:
>
> <soapenv:Body>
> <ElementDate
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
> </soapenv:Body>
>
> Is it possible to achieve the same result?
>
> Thank a lot for your attention (and patience :) )
>
> -- Ivan
>
>
>
> ___________________________________
> Nuovo Yahoo! Messenger: E' molto più divertente:
> Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo
> ora!
> http://it.messenger.yahoo.it
>



___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4581 From: Ivan Venuti <ivanvenuti@...>
Date: Fri Apr 15, 2005 4:44 pm
Subject: Re: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
ivanvenuti
Send Email Send Email
 
My forwarded message seems to be quite difficult to
read! here is a re-post much more easy to read.

First of all seems that the generated SOAP message is
still unreadable by Axis; this is the message
generated by Perl:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
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:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
  <productsList
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">
   <ElementDate
xsi:type="xsd:date">2005-04-11</ElementDate>
</productsList>
</soap:Body>
</soap:Envelope>

This one is generated by the Axis client:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ElementDate
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
</soapenv:Body>
</soapenv:Envelope>

They are quite similar but the second one hasn’t the
element <productsList ..> in the SOAP:Body.

The code, originated from the code given in the list
but with some corrections (e.g. made a date and not a
string in order to achieve the xsd type):

use strict;
use SOAP::Lite +trace => qw (debug);

# Your Variables - set accordingly
my
$proxy='http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl';
my
$uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
my $date = "2005-04-11";

my $soap = SOAP::Lite
->uri($uri)
->on_action( sub {join '/',$uri,$_[1]} )
->proxy($proxy);

my
$method=SOAP::Data->name('productsList')->attr({xmlns
=> $uri});

my @params;

my $request=
SOAP::Data->name('ElementDate')->value($date)->type('date');

push @params,$request;

my $result = $soap->call($method => @params);

if ($result->fault){
print $result->faultstring;
}
else{
print $result->result;
}

The error trace is quite similar to the previous one:


SOAP::Transport::HTTP::Client::send_receive: POST
http://www.caribel.it:8080/axi
s/services/ProductsExampleWSPort?wsdl HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 514
Content-Type: text/xml; charset=utf-8
SOAPAction:
http://ivenuti.altervista.org/ProductsExampleWS.xsd1/productsList

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://sch
emas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/env
elope/"><soap:Body><productsList
xmlns="http://ivenuti.altervista.org/ProductsEx
ampleWS.xsd1"><ElementDate
xsi:type="xsd:date">2005-04-11</ElementDate></product
sList></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1
500 Internal
Server Error
Connection: close
Date: Fri, 15 Apr 2005 16:08:02 GMT
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Client-Date: Fri, 15 Apr 2005 16:06:42 GMT
Client-Peer: 151.4.110.70:8080
Client-Response-Num: 1

<?xml version="1.0"
encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://sc
hemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" x
mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which
is NOT expected, in something it was trying to
deserialize.</faultstring>
<detail><ns1:hostname
xmlns:ns1="http://xml.apache.org/axis/">alpha</ns1:hostname></detail></soapenv:
Fault></soapenv:Body></soapenv:Envelope>
org.xml.sax.SAXException: SimpleDeserializer
encountered a child
element, which
is NOT expected, in something it was trying to
deserialize.




___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4582 From: "Monica Vallejo" <movallejo@...>
Date: Sat Apr 16, 2005 1:10 am
Subject: gSOAP client and SOAP::Lite server
movallejo
Send Email Send Email
 
Hi

I'm trying communicate a client writing in C with gSOAP v2.7 to a
SOAP::Lite server.

I have a very simple function: int ns__test(char *name, char **);
I've also added the "-1" option, with no observable effect.It all
compiles fine, but when I actually run my program, it always ignores
the s-gensym3 tag that SOAP::Lite returns.

I've seen some postings in SOAP::Lite's and gSOAP's groups, but i
haven't found any answer on this issue.

I've included some debugging information below.

======>test.c<========
#include "soapH.h"

int main(int argc, char **argv) {
   struct soap soap;

   int q;
   char *user = "xxxxx";

   soap_init(&soap);
   if (soap_call_ns__getUserID(&soap, "http://dev.........", NULL,
user, &q) == 0)
     printf("----->%d", q);
   else
     soap_print_fault(&soap, stderr);

   return 0;
}

struct Namespace namespaces[] =
{
   {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},    /*
MUST be first */
   {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},    /*
MUST be second */
   {"xsi", "http://www.w3.org/1999/XMLSchema-instance"},         /*
MUST be third */
   {"xsd", "http://www.w3.org/1999/XMLSchema"},
   {"ns", "urn:Users"},                                          /*
Method namespace URI */
   {NULL, NULL}
};

=====>test.h<=======
//gsoap ns service style: rpc
//gsoap ns service encoding: encoded
//gsoap ns service namespace: urn:Users
//gsoap ns service location: http://dev........
//gsoap ns service method-action: getUserID ""
int ns__getUserID(char *user, int *resp);

=====>soap.cgi<======
#!/usr/bin/perl -w
use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI
         -> dispatch_to('Users')
         -> handle;

package Users;


sub getUserID {
         return 123;
}

=====> SENT.log <======
POST /soap.cgi HTTP/1.1
Host: dev.........
User-Agent: gSOAP/2.6
Content-Type: text/xml; charset=utf-8
Content-Length: 468
Connection: close
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:ns="urn:Users"><SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
id="_0"><ns:getUserID><user>xxxxx</user></ns:getUs
erID></SOAP-ENV:Body></SOAP-ENV:Envelope>


=====> RECV.log <=======
HTTP/1.1 200 OK
Date: Sat, 16 Apr 2005 01:12:03 GMT
Server: Apache/2.0.52 (Debian GNU/Linux) PHP/4.3.8-12
mod_perl/1.999.20 Perl/v5.8.4
SOAPServer: SOAP::Lite/Perl/0.60
Content-Length: 516
Connection: close
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org
/soap/encoding/"><SOAP-ENV:Body><namesp1:getUserIDResponse
xmlns:namesp1="urn:Users"><s-gensym3
xsi:type="xsd:int">1</s-gensym3></namesp1:getUserI
DResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>


==> TEST.log <==
.....
End of block sequence, free all remaining blocks
Tags and (default) namespaces match: 'xsi:type' 'xsi:type'
Unknown element 's-gensym3' (level=3, 1)
IGNORING element 's-gensym3'
End element found (level=3) 's-gensym3'=''
Popped namespace binding (level=2) 'namesp1'
.......



Thanks in advance!

#4583 From: "Graham Irvine" <graham@...>
Date: Sat Apr 16, 2005 10:25 am
Subject: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
graham23sk
Send Email Send Email
 
mmm .. yes thats a tough one . Document Literal Encoding , no method
element .

Im not sure if SOAP::Lite can handle that yet ? perhaps someone else
can help ?.

I tried creating a new serializer object and sending in type "xml"
creating the SOAP::DATA as an xml string but it wouldnt have it .

In the end I had to do it by hand. (see below)

I will keep trying to find a SOAP::Lite solution and post it if i do.

meanwhile here is a big perl code you could use to do what you want.

#!/usr/bin/perl -w

use strict;

use LWP::UserAgent;
use HTTP::Request::Common;

my $proxy =
"http://www.caribel.it:8080/axis/services/ProductsExampleWSPort";
my $uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
my $action = "$uri/productsList";
my $date = "2005-04-11";

my $userAgent = LWP::UserAgent->new(agent => 'Perl SOAP');

my $message = "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soapenv:Envelope
xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
<soapenv:Body>
<ElementDate
xmlns=\"http://ivenuti.altervista.org/ProductsExampleWS.xsd1\">$date</ElementDat\
e>
</soapenv:Body>
</soapenv:Envelope>";

my $response = $userAgent->request(POST $proxy,
Content_Type => 'text/xml',
SOAPAction => $action,
Content => $message);

print $response->error_as_HTML unless $response->is_success;
print $response->as_string;

--- In soaplite@yahoogroups.com, Ivan Venuti <ivanvenuti@y...> wrote:
> My forwarded message seems to be quite difficult to
> read! here is a re-post much more easy to read.
>
> First of all seems that the generated SOAP message is
> still unreadable by Axis; this is the message
> generated by Perl:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> 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:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
>  <productsList
> xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">
>   <ElementDate
> xsi:type="xsd:date">2005-04-11</ElementDate>
> </productsList>
> </soap:Body>
> </soap:Envelope>
>
> This one is generated by the Axis client:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
>
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ElementDate
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
> </soapenv:Body>
> </soapenv:Envelope>
>
> They are quite similar but the second one hasn't the
> element <productsList ..> in the SOAP:Body.
>
> The code, originated from the code given in the list
> but with some corrections (e.g. made a date and not a
> string in order to achieve the xsd type):
>
> use strict;
> use SOAP::Lite +trace => qw (debug);
>
> # Your Variables - set accordingly
> my
>
$proxy='http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl';
> my
> $uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
> my $date = "2005-04-11";
>
> my $soap = SOAP::Lite
> ->uri($uri)
> ->on_action( sub {join '/',$uri,$_[1]} )
> ->proxy($proxy);
>
> my
> $method=SOAP::Data->name('productsList')->attr({xmlns
> => $uri});
>
> my @params;
>
> my $request=
> SOAP::Data->name('ElementDate')->value($date)->type('date');
>
> push @params,$request;
>
> my $result = $soap->call($method => @params);
>
> if ($result->fault){
> print $result->faultstring;
> }
> else{
> print $result->result;
> }
>
> The error trace is quite similar to the previous one:
>
>
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://www.caribel.it:8080/axi
> s/services/ProductsExampleWSPort?wsdl HTTP/1.1
> Accept: text/xml
> Accept: multipart/*
> Accept: application/soap
> Content-Length: 514
> Content-Type: text/xml; charset=utf-8
> SOAPAction:
> http://ivenuti.altervista.org/ProductsExampleWS.xsd1/productsList
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> xmlns:xsi="http://www.w3.or
> g/2001/XMLSchema-instance"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
> ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> soap:encodingStyle="http://sch
> emas.xmlsoap.org/soap/encoding/"
> xmlns:soap="http://schemas.xmlsoap.org/soap/env
> elope/"><soap:Body><productsList
> xmlns="http://ivenuti.altervista.org/ProductsEx
> ampleWS.xsd1"><ElementDate
> xsi:type="xsd:date">2005-04-11</ElementDate></product
> sList></soap:Body></soap:Envelope>
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1
> 500 Internal
> Server Error
> Connection: close
> Date: Fri, 15 Apr 2005 16:08:02 GMT
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Client-Date: Fri, 15 Apr 2005 16:06:42 GMT
> Client-Peer: 151.4.110.70:8080
> Client-Response-Num: 1
>
> <?xml version="1.0"
> encoding="utf-8"?><soapenv:Envelope
> xmlns:soapenv="http://sc
> hemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" x
> mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body><soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>org.xml.sax.SAXException:
> SimpleDeserializer encountered a child element, which
> is NOT expected, in something it was trying to
> deserialize.</faultstring>
> <detail><ns1:hostname
>
xmlns:ns1="http://xml.apache.org/axis/">alpha</ns1:hostname></detail></soapenv:
> Fault></soapenv:Body></soapenv:Envelope>
> org.xml.sax.SAXException: SimpleDeserializer
> encountered a child
> element, which
> is NOT expected, in something it was trying to
> deserialize.
>
>
>
>
> ___________________________________
> Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar,
Webcam, Giochi, Rubrica… Scaricalo ora!
> http://it.messenger.yahoo.it

#4584 From: "Graham Irvine" <graham@...>
Date: Sat Apr 16, 2005 10:41 am
Subject: Re: gSOAP client and SOAP::Lite server
graham23sk
Send Email Send Email
 
Hi

Do you have any access to the SOAP::Lite server . Solution to the
<c-gensym> nuisance being returned by it is to properly escape the
SOAP::DATA elements .. e.g

=> \SOAP::DATA->name('name')->value('value')

If i was getting a rubbish response from a server using a perl client
I would deserialize , or parse the raw xml response , by hand as long
as I had the data in there somewhere , which it appears you do. As
long as gSOAP gives you that facility the alternative would be to do that.

HTH
Graham



--- In soaplite@yahoogroups.com, "Monica Vallejo" <movallejo@y...> wrote:
>
> Hi
>
> I'm trying communicate a client writing in C with gSOAP v2.7 to a
> SOAP::Lite server.
>
> I have a very simple function: int ns__test(char *name, char **);
> I've also added the "-1" option, with no observable effect.It all
> compiles fine, but when I actually run my program, it always ignores
> the s-gensym3 tag that SOAP::Lite returns.
>
> I've seen some postings in SOAP::Lite's and gSOAP's groups, but i
> haven't found any answer on this issue.
>
> I've included some debugging information below.
>
> ======>test.c<========
> #include "soapH.h"
>
> int main(int argc, char **argv) {
>   struct soap soap;
>
>   int q;
>   char *user = "xxxxx";
>
>   soap_init(&soap);
>   if (soap_call_ns__getUserID(&soap, "http://dev.........", NULL,
> user, &q) == 0)
>     printf("----->%d", q);
>   else
>     soap_print_fault(&soap, stderr);
>
>   return 0;
> }
>
> struct Namespace namespaces[] =
> {
>   {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/"},    /*
> MUST be first */
>   {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/"},    /*
> MUST be second */
>   {"xsi", "http://www.w3.org/1999/XMLSchema-instance"},         /*
> MUST be third */
>   {"xsd", "http://www.w3.org/1999/XMLSchema"},
>   {"ns", "urn:Users"},                                          /*
> Method namespace URI */
>   {NULL, NULL}
> };
>
> =====>test.h<=======
> //gsoap ns service style: rpc
> //gsoap ns service encoding: encoded
> //gsoap ns service namespace: urn:Users
> //gsoap ns service location: http://dev........
> //gsoap ns service method-action: getUserID ""
> int ns__getUserID(char *user, int *resp);
>
> =====>soap.cgi<======
> #!/usr/bin/perl -w
> use SOAP::Transport::HTTP;
>
> SOAP::Transport::HTTP::CGI
>         -> dispatch_to('Users')
>         -> handle;
>
> package Users;
>
>
> sub getUserID {
>         return 123;
> }
>
> =====> SENT.log <======
> POST /soap.cgi HTTP/1.1
> Host: dev.........
> User-Agent: gSOAP/2.6
> Content-Type: text/xml; charset=utf-8
> Content-Length: 468
> Connection: close
> SOAPAction: ""
>
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> xmlns:ns="urn:Users"><SOAP-ENV:Body
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> id="_0"><ns:getUserID><user>xxxxx</user></ns:getUs
> erID></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
>
> =====> RECV.log <=======
> HTTP/1.1 200 OK
> Date: Sat, 16 Apr 2005 01:12:03 GMT
> Server: Apache/2.0.52 (Debian GNU/Linux) PHP/4.3.8-12
> mod_perl/1.999.20 Perl/v5.8.4
> SOAPServer: SOAP::Lite/Perl/0.60
> Content-Length: 516
> Connection: close
> Content-Type: text/xml; charset=utf-8
>
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org
> /soap/encoding/"><SOAP-ENV:Body><namesp1:getUserIDResponse
> xmlns:namesp1="urn:Users"><s-gensym3
> xsi:type="xsd:int">1</s-gensym3></namesp1:getUserI
> DResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
>
> ==> TEST.log <==
> .....
> End of block sequence, free all remaining blocks
> Tags and (default) namespaces match: 'xsi:type' 'xsi:type'
> Unknown element 's-gensym3' (level=3, 1)
> IGNORING element 's-gensym3'
> End element found (level=3) 's-gensym3'=''
> Popped namespace binding (level=2) 'namesp1'
> .......
>
>
>
> Thanks in advance!

#4585 From: Ivan Venuti <ivanvenuti@...>
Date: Sat Apr 16, 2005 10:52 am
Subject: Re: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
ivanvenuti
Send Email Send Email
 
thanks Graham: it works!
Unfortunatly the solution seems too much "ad hoc" one
and pporly based on my WSDL :)

Thank again, I open another thread for
document/literal support...

-- Ivan

  --- Graham Irvine <graham@...> ha
scritto:

---------------------------------

mmm .. yes thats a tough one . Document Literal
Encoding , no method
element .

Im not sure if SOAP::Lite can handle that yet ?
perhaps someone else
can help ?.

I tried creating a new serializer object and sending
in type "xml"
creating the SOAP::DATA as an xml string but it
wouldnt have it .

In the end I had to do it by hand. (see below)

I will keep trying to find a SOAP::Lite solution and
post it if i do.

meanwhile here is a big perl code you could use to do
what you want.

#!/usr/bin/perl -w

use strict;

use LWP::UserAgent;
use HTTP::Request::Common;

my $proxy =
"http://www.caribel.it:8080/axis/services/ProductsExampleWSPort";
my
$uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
my $action = "$uri/productsList";
my $date = "2005-04-11";

my $userAgent = LWP::UserAgent->new(agent => 'Perl
SOAP');

my $message = "<?xml version=\"1.0\"
encoding=\"utf-8\"?>
<soapenv:Envelope
xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
<soapenv:Body>
<ElementDate
xmlns=\"http://ivenuti.altervista.org/ProductsExampleWS.xsd1\">$date</ElementDat\
e>
</soapenv:Body>
</soapenv:Envelope>";

my $response = $userAgent->request(POST $proxy,
Content_Type => 'text/xml',
SOAPAction => $action,
Content => $message);

print $response->error_as_HTML unless
$response->is_success;
print $response->as_string;

--- In soaplite@yahoogroups.com, Ivan Venuti
<ivanvenuti@y...> wrote:
> My forwarded message seems to be quite difficult to
> read! here is a re-post much more easy to read.
>
> First of all seems that the generated SOAP message
is
> still unreadable by Axis; this is the message
> generated by Perl:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope
>
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
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:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
>  <productsList
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">
>   <ElementDate
> xsi:type="xsd:date">2005-04-11</ElementDate>
> </productsList>
> </soap:Body>
> </soap:Envelope>
>
> This one is generated by the Axis client:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
>
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ElementDate
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
> </soapenv:Body>
> </soapenv:Envelope>
>
> They are quite similar but the second one hasn't the
> element <productsList ..> in the SOAP:Body.
>
> The code, originated from the code given in the list
> but with some corrections (e.g. made a date and not
a
> string in order to achieve the xsd type):
>
> use strict;
> use SOAP::Lite +trace => qw (debug);
>
> # Your Variables - set accordingly
> my
>
$proxy='http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl';
> my
>
$uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
> my $date = "2005-04-11";
>
> my $soap = SOAP::Lite
> ->uri($uri)
> ->on_action( sub {join '/',$uri,$_[1]} )
> ->proxy($proxy);
>
> my
>
$method=SOAP::Data->name('productsList')->attr({xmlns
> => $uri});
>
> my @params;
>
> my $request=
>
SOAP::Data->name('ElementDate')->value($date)->type('date');
>
> push @params,$request;
>
> my $result = $soap->call($method => @params);
>
> if ($result->fault){
> print $result->faultstring;
> }
> else{
> print $result->result;
> }
>
> The error trace is quite similar to the previous
one:
>
>
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://www.caribel.it:8080/axi
> s/services/ProductsExampleWSPort?wsdl HTTP/1.1
> Accept: text/xml
> Accept: multipart/*
> Accept: application/soap
> Content-Length: 514
> Content-Type: text/xml; charset=utf-8
> SOAPAction:
>
http://ivenuti.altervista.org/ProductsExampleWS.xsd1/productsList
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> xmlns:xsi="http://www.w3.or
> g/2001/XMLSchema-instance"
>
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
> ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> soap:encodingStyle="http://sch
> emas.xmlsoap.org/soap/encoding/"
> xmlns:soap="http://schemas.xmlsoap.org/soap/env
> elope/"><soap:Body><productsList
> xmlns="http://ivenuti.altervista.org/ProductsEx
> ampleWS.xsd1"><ElementDate
>
xsi:type="xsd:date">2005-04-11</ElementDate></product
> sList></soap:Body></soap:Envelope>
> SOAP::Transport::HTTP::Client::send_receive:
HTTP/1.1
> 500 Internal
> Server Error
> Connection: close
> Date: Fri, 15 Apr 2005 16:08:02 GMT
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Client-Date: Fri, 15 Apr 2005 16:06:42 GMT
> Client-Peer: 151.4.110.70:8080
> Client-Response-Num: 1
>
> <?xml version="1.0"
> encoding="utf-8"?><soapenv:Envelope
> xmlns:soapenv="http://sc
> hemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" x
>
mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body><soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>org.xml.sax.SAXException:
> SimpleDeserializer encountered a child element,
which
> is NOT expected, in something it was trying to
> deserialize.</faultstring>
> <detail><ns1:hostname
>
xmlns:ns1="http://xml.apache.org/axis/">alpha</ns1:hostname></detail></soapenv:
> Fault></soapenv:Body></soapenv:Envelope>
> org.xml.sax.SAXException: SimpleDeserializer
> encountered a child
> element, which
> is NOT expected, in something it was trying to
> deserialize.
>
>
>
>
> ___________________________________
> Nuovo Yahoo! Messenger: E' molto più divertente:
Audibles, Avatar,
Webcam, Giochi, Rubrica… Scaricalo ora!
> http://it.messenger.yahoo.it





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

    Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.




___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4586 From: Ivan Venuti <ivanvenuti@...>
Date: Sat Apr 16, 2005 10:56 am
Subject: Is document/literal supported?
ivanvenuti
Send Email Send Email
 
First of all many thanks for your usefull comments!

Here are some results, using various tools &
languages; these results are achieved using my Axis
server example:

Language  Tool               Automated Client
-------- ------------------ ------------------
Java      Axis               Correct
VB.NET    VisualStudio 2003  Correct
Delphi    Delphi 2005 IDE    COrrect
PHP       PEAR SOAP          Correct
VBA       MS Toolkit 4 VBA   Mainly Correct*
Python    SOAPpy             Incorrect
Perl      SOAP::Lite         Incorrect

* noticed some lack of support for one complex
datatype

For anyone interested I can give details of the
generated clients...

But now I'd like to make a summary about my used
scenario and the problems still open in it with
SOAP::Perl:


1) I have a WS developed in Axis and described by a
WSDL that indicates document/literal i.e.:

   1.1) the style of messages must be document

   1.2) the encoding is literal


2) I have written a client in Perl using SOAP::Lite:

   2.1) also if I give the WSDL for the proxy
generation, the client generated RPC style messages

   2.2) anyway it is possible to force the use of
document style via personalized settings (please give
me some more help on this topic if you find some easy
way to achieve the correct result!)

   2.3) In order to achieve the indicates types in the
WSDL there schould be an appropriate specification of
the type of the parameters in the method's call

Is it my summary correct or am I missing some
important point?

So I would know if the lack of support of document
style is due to my WSDL or it is a general fault of
SOAP::Lite.
In the first case, anyone can give me a direction in
order to isolate the problem in my WSDL?
In the second case, is it plan a future release of the
package with full support of document/style messages?

Also, is there any useful way to generate appropriate
types based only to the WSDL?


Thanks!

-- Ivan



___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4587 From: "Graham Irvine" <graham@...>
Date: Sat Apr 16, 2005 11:46 am
Subject: Re: New to SOAP:Lite: Can't use a WS written in Java with Axis...
graham23sk
Send Email Send Email
 
Hi Ivan

  :) SOAP::Lite doesnt read from the WSDL either to generate its
request so im not sure if there is much difference there ...

However if you need to stick with soap::lite I have in the past had
some joy with SOAP-WSDL module which does do that , and uses
SOAP::Lite to make the calls. It might be of help.

It was a useful way to get .NET compatibility for version <0.55 if you
were connecting to a lot of service methods without hand coding them.

Graham

--- In soaplite@yahoogroups.com, Ivan Venuti <ivanvenuti@y...> wrote:
> thanks Graham: it works!
> Unfortunatly the solution seems too much "ad hoc" one
> and pporly based on my WSDL :)
>
> Thank again, I open another thread for
> document/literal support...
>
> -- Ivan
>
>  --- Graham Irvine <graham@g...> ha
> scritto:
>
> ---------------------------------
>
> mmm .. yes thats a tough one . Document Literal
> Encoding , no method
> element .
>
> Im not sure if SOAP::Lite can handle that yet ?
> perhaps someone else
> can help ?.
>
> I tried creating a new serializer object and sending
> in type "xml"
> creating the SOAP::DATA as an xml string but it
> wouldnt have it .
>
> In the end I had to do it by hand. (see below)
>
> I will keep trying to find a SOAP::Lite solution and
> post it if i do.
>
> meanwhile here is a big perl code you could use to do
> what you want.
>
> #!/usr/bin/perl -w
>
> use strict;
>
> use LWP::UserAgent;
> use HTTP::Request::Common;
>
> my $proxy =
> "http://www.caribel.it:8080/axis/services/ProductsExampleWSPort";
> my
> $uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
> my $action = "$uri/productsList";
> my $date = "2005-04-11";
>
> my $userAgent = LWP::UserAgent->new(agent => 'Perl
> SOAP');
>
> my $message = "<?xml version=\"1.0\"
> encoding=\"utf-8\"?>
> <soapenv:Envelope
> xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
> <soapenv:Body>
> <ElementDate
>
xmlns=\"http://ivenuti.altervista.org/ProductsExampleWS.xsd1\">$date</ElementDat\
e>
> </soapenv:Body>
> </soapenv:Envelope>";
>
> my $response = $userAgent->request(POST $proxy,
> Content_Type => 'text/xml',
> SOAPAction => $action,
> Content => $message);
>
> print $response->error_as_HTML unless
> $response->is_success;
> print $response->as_string;
>
> --- In soaplite@yahoogroups.com, Ivan Venuti
> <ivanvenuti@y...> wrote:
> > My forwarded message seems to be quite difficult to
> > read! here is a re-post much more easy to read.
> >
> > First of all seems that the generated SOAP message
> is
> > still unreadable by Axis; this is the message
> > generated by Perl:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soap:Envelope
> >
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >
> 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:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body>
> >  <productsList
> >
> xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">
> >   <ElementDate
> > xsi:type="xsd:date">2005-04-11</ElementDate>
> > </productsList>
> > </soap:Body>
> > </soap:Envelope>
> >
> > This one is generated by the Axis client:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soapenv:Envelope
> >
> >
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> >  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <ElementDate
> >
>
xmlns="http://ivenuti.altervista.org/ProductsExampleWS.xsd1">2005-04-14</Element\
Date>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > They are quite similar but the second one hasn't the
> > element <productsList ..> in the SOAP:Body.
> >
> > The code, originated from the code given in the list
> > but with some corrections (e.g. made a date and not
> a
> > string in order to achieve the xsd type):
> >
> > use strict;
> > use SOAP::Lite +trace => qw (debug);
> >
> > # Your Variables - set accordingly
> > my
> >
>
$proxy='http://www.caribel.it:8080/axis/services/ProductsExampleWSPort?wsdl';
> > my
> >
> $uri='http://ivenuti.altervista.org/ProductsExampleWS.xsd1';
> > my $date = "2005-04-11";
> >
> > my $soap = SOAP::Lite
> > ->uri($uri)
> > ->on_action( sub {join '/',$uri,$_[1]} )
> > ->proxy($proxy);
> >
> > my
> >
> $method=SOAP::Data->name('productsList')->attr({xmlns
> > => $uri});
> >
> > my @params;
> >
> > my $request=
> >
> SOAP::Data->name('ElementDate')->value($date)->type('date');
> >
> > push @params,$request;
> >
> > my $result = $soap->call($method => @params);
> >
> > if ($result->fault){
> > print $result->faultstring;
> > }
> > else{
> > print $result->result;
> > }
> >
> > The error trace is quite similar to the previous
> one:
> >
> >
> > SOAP::Transport::HTTP::Client::send_receive: POST
> > http://www.caribel.it:8080/axi
> > s/services/ProductsExampleWSPort?wsdl HTTP/1.1
> > Accept: text/xml
> > Accept: multipart/*
> > Accept: application/soap
> > Content-Length: 514
> > Content-Type: text/xml; charset=utf-8
> > SOAPAction:
> >
> http://ivenuti.altervista.org/ProductsExampleWS.xsd1/productsList
> >
> > <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> > xmlns:xsi="http://www.w3.or
> > g/2001/XMLSchema-instance"
> >
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
> > ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > soap:encodingStyle="http://sch
> > emas.xmlsoap.org/soap/encoding/"
> > xmlns:soap="http://schemas.xmlsoap.org/soap/env
> > elope/"><soap:Body><productsList
> > xmlns="http://ivenuti.altervista.org/ProductsEx
> > ampleWS.xsd1"><ElementDate
> >
> xsi:type="xsd:date">2005-04-11</ElementDate></product
> > sList></soap:Body></soap:Envelope>
> > SOAP::Transport::HTTP::Client::send_receive:
> HTTP/1.1
> > 500 Internal
> > Server Error
> > Connection: close
> > Date: Fri, 15 Apr 2005 16:08:02 GMT
> > Server: Apache-Coyote/1.1
> > Content-Type: text/xml;charset=utf-8
> > Client-Date: Fri, 15 Apr 2005 16:06:42 GMT
> > Client-Peer: 151.4.110.70:8080
> > Client-Response-Num: 1
> >
> > <?xml version="1.0"
> > encoding="utf-8"?><soapenv:Envelope
> > xmlns:soapenv="http://sc
> > hemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema" x
> >
> mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body><soapenv:Fault>
> > <faultcode>soapenv:Server.userException</faultcode>
> > <faultstring>org.xml.sax.SAXException:
> > SimpleDeserializer encountered a child element,
> which
> > is NOT expected, in something it was trying to
> > deserialize.</faultstring>
> > <detail><ns1:hostname
> >
>
xmlns:ns1="http://xml.apache.org/axis/">alpha</ns1:hostname></detail></soapenv:
> > Fault></soapenv:Body></soapenv:Envelope>
> > org.xml.sax.SAXException: SimpleDeserializer
> > encountered a child
> > element, which
> > is NOT expected, in something it was trying to
> > deserialize.
> >
> >
> >
> >
> > ___________________________________
> > Nuovo Yahoo! Messenger: E' molto più divertente:
> Audibles, Avatar,
> Webcam, Giochi, Rubrica… Scaricalo ora!
> > http://it.messenger.yahoo.it
>
>
>
>
>
> ---------------------------------
> 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
>
>    Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service.
>
>
>
>
> ___________________________________
> Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar,
Webcam, Giochi, Rubrica… Scaricalo ora!
> http://it.messenger.yahoo.it

#4588 From: Ivan Venuti <ivanvenuti@...>
Date: Sat Apr 16, 2005 6:09 pm
Subject: Error with SOAP::WSDL
ivanvenuti
Send Email Send Email
 
I've given a look at SOAP::WSDL. This is my example
(the same as previously posted but using only
SOAP::Lite):


use strict;
use SOAP::WSDL;

my
$wsdl_uri='http://127.0.0.1:8080/axis/services/ProductsExampleWSPort?wsdl';
my
$wsdl_proxy='http://127.0.0.1:8080/axis/services/ProductsExampleWSPort';

my $soap=SOAP::WSDL->new( wsdl => $wsdl_uri)->proxy(
$wsdl_proxy );
$soap->wsdlinit;

print $soap->call( "productsList", "2000-01-01" );


The error is:

Error processing WSDL: cannot find input message for
method 'productsOrderConfirmation'
(/wsdl:definitions/wsdl:portType[@name='ProductsExampleWSPort']/wsdl:operation[@\
name='productsOrderConfirmation']/wsdl:input/@message)
at C:/Perl/site/lib/SOAP/WSDL.pm line 146.

Any idea about this kind of error?

I've also tried:

use SOAP::WSDL +trace => qw (debug)
but without any other message...

p.s. is this the right place to ask about SOAP::WSDL?
If this isn't the right place, please give me
directions about more specific ML; thanks

-- Ivan



___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente:
Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo
ora!
http://it.messenger.yahoo.it



___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it

#4589 From: "David Inglis" <david.inglis@...>
Date: Sun Apr 17, 2005 11:52 pm
Subject: Problem getting soap lite working with wsdl
david.inglis@...
Send Email Send Email
 
Can anybody please help with this error message
 
SOAP::Schema->schema has been deprecated. Please use SOAP::Schema->schema_url instead. at /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 2803.
Service description 'http://warehouse.atdw.com.au/soap' can't be loaded: 500 Can't connect to warehouse.atdw.com.au:80 (Bad hostname 'warehouse.atdw.com.au')
You can look at the wsdl definition file hear
 
The Web Service Definition Language file (WSDL) – A standard Web Service file that defines the functions exposed by a web service. This can also be viewed online at: http://national.atdw.com.au/soap/AustralianTourismWebService.asmx?WSDL
 
 
 
This is the code I'm trying to test with, am I close or am I completely going totally in the wrong direction?
 
 
#!/usr/bin/perl
 

 
 use SOAP::WSDL;
 
        my $soap=SOAP::WSDL->new( wsdl => 'http://warehouse.atdw.com.au/soap' )
            ->proxy('http://warehouse.atdw.com.au/soap/atdw_live_api.wsdl',1);
 
 
 
        $soap->wsdlinit;
 
        my $som=$soap->call( 'CommandHandler' => [
                { DistributorKey => 'xxxxxxxxxxxx' },
                { CommandName => 'GetCountryStateArea'},
                { CommandParameters => '<parameters><row><param>COUNTRY_NAME</param><value>AUSTRALIA</value></row></parameters>' } ]);
 
 

#4590 From: "David Inglis" <david.inglis@...>
Date: Mon Apr 18, 2005 1:02 am
Subject: re Can anybody please help with this error message
david.inglis@...
Send Email Send Email
 
Can anybody please help with this error message sorry did not have a default route set when I sent my last request for assistance, I now get this message
 
 
SOAP::Schema->schema has been deprecated. Please use SOAP::Schema->schema_url instead. at /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 2803.
Service description 'http://warehouse.atdw.com.au/soap' can't be loaded: 403 Access Forbidden
 
The Web Service Definition Language file (WSDL) – A standard Web Service file that defines the functions exposed by a web service. This can also be viewed online at: http://national.atdw.com.au/soap/AustralianTourismWebService.asmx?WSDL
 
 
 
This is the code I'm trying to test with, am I close or am I completely going totally in the wrong direction?
 
 
#!/usr/bin/perl
 

 
 use SOAP::WSDL;
 
        my $soap=SOAP::WSDL->new( wsdl => 'http://warehouse.atdw.com.au/soap' )
            ->proxy('http://warehouse.atdw.com.au/soap/atdw_live_api.wsdl',1);
 
 
 
        $soap->wsdlinit;
 
        my $som=$soap->call( 'CommandHandler' => [
                { DistributorKey => 'xxxxxxxxxxxx' },
                { CommandName => 'GetCountryStateArea'},
                { CommandParameters => '<parameters><row><param>COUNTRY_NAME</param><value>AUSTRALIA</value></row></parameters>' } ]);
 
 

Messages 4557 - 4590 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

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