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 2335 - 2364 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#2335 From: "Rajesh Kumar Mallah <mallah@...>" <mallah@...>
Date: Sun Feb 2, 2003 12:36 pm
Subject: debugging a SOAP::Lite server...
mallah_rajesh
Send Email Send Email
 
Hi Folks,

My SOAP::Lite server crashes anytime and stops listening.
how shud i debug the problem . is there any way to trace on *server*
side and log the method calls to a file?

aticipating a reply
regds
Mallah.

source code of the SOAP::Lite server:


# use SOAP::Lite +trace => all;
use SOAP::Transport::HTTP;


# This bit is the actual SOAP server - all of six lines
$|++;
my $daemon = SOAP::Transport::HTTP::Daemon
     -> new (LocalAddr => 'xx.xx.xx.xx', LocalPort => 7777)
     -> objects_by_reference(qw(Vpop))
     -> dispatch_to('Vpop');
   print "Contact to Vpop server at ", $daemon->url, "\n";
   $daemon->handle;


package Vpop;

use vpopmail;
sub add_user
{
         my ($self,$username, $password) = @_;

         my $res = vadduser($username, 'trade-india.com', $password,
'Users', 0);

         return $res;

}

sub change_password
{
         my ($self,$username, $password) = @_;
         vpasswd($username,'trade-india.com',$password,0);
}

sub vauth_user1
{
         my ($self,$user,$domain,$pass) = @_;
         if ( &vpopmail::vauth_user($user, $domain , $pass , 0)) {
                 return 1;
         }
         return 0;
}


1;

#2336 From: Stephen.Rosman@...
Date: Mon Feb 3, 2003 7:13 am
Subject: Stupid Content-Encoding error...
Stephen.Rosman@...
Send Email Send Email
 
I'm trying to get the SOAP::Lite library working and I'm getting an
insanely stupid
error.  (SOAP-Lite 0.55 on Apache 1.3 on Red Hat Linux 7.0)

I set up the basic quickstart example (http://guide.soaplite.com/) for the
CGI server
and when I run the client perl script it returns the message

"Unexpected Content-Encoding 'script ' returned"

When I use the -w switch on the shebang line it returns

"Unexpected Content-Encoding '-w' returned"

So something screwy seems to be going on with the way Apache is returning
the
Content-Encoding header.  I've checked the output with +trace and the
server is
actually returning the (stupid) content-encoding reported by the client.

I'm just using the standard cgi-script handler +ExecCGI on the server
script.

I've checked google, the mailing list archive, the Apache documentation,
the SOAP::Lite
documentation and no one else in the world appears to be having this
problem.


Apache configuration for the directory:
--------------------
AddHandler cgi-script .cgi
Options +ExecCGI +Indexes
--------------------


serv.cgi
--------------------
#!/usr/bin/perl

use SOAP::Transport::HTTP;

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

package Blah;

sub test {
         return "blah blah blah";
}
--------------------


client.pl
--------------------
#!/usr/bin/perl

use SOAP::Lite +trace;

$result = SOAP::Lite
->uri('http://www.soaplite.com/Blah')
->proxy('http://localhost/auth/soap/serv.cgi')
->test()
->result;

print "result: $result\n";
--------------------


Output of client.pl
--------------------
SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: test
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x83a91a8)
SOAP::Transport::HTTP::Client::send_receive: POST
http://localhost/auth/soap/ser
v.cgi
Accept: text/xml
Accept: multipart/*
Content-Length: 452
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.soaplite.com/Blah#test"

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC
="http://
schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle
="http://schemas.xmlso
ap.org/soap/encoding/" xmlns:SOAP-ENV
="http://schemas.xmlsoap.org/soap/envelope/
" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd
="http://www.w3
.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:test xmlns:namesp1
="http://www.soap
lite.com/Blah"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x8486f90)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Date: Mon, 03 Feb 2003 06:29:46 GMT
Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a
mod_p
erl/1.24
Content-Encoding: script
Content-Length: 541
Content-Type: text/xml; charset=utf-8
Client-Date: Mon, 03 Feb 2003 06:29:46 GMT
Client-Peer: 127.0.0.1:80
SOAPServer: SOAP::Lite/Perl/0.55

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC
="http://
schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle
="http://schemas.xmlso
ap.org/soap/encoding/" xmlns:SOAP-ENV
="http://schemas.xmlsoap.org/soap/envelope/
" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd
="http://www.w3
.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:testResponse xmlns:namesp1
="http://
www.soaplite.com/Blah"><s-gensym3 xsi:type="xsd:string">blah blah
blah</s-gensym
3></namesp1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Unexpected Content-Encoding 'script ' returned
SOAP::Lite::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
--------------------

If anyone can help I'd appreciate it.


--
Stephen Rosman - Parliament House Web Developer - phone: 9651 8490

#2337 From: "vanvuure <marcel_van_vuure@...>" <marcel_van_vuure@...>
Date: Mon Feb 3, 2003 2:00 pm
Subject: beginner's question/Is this a proper SOAP Envelope?
vanvuure
Send Email Send Email
 
Hi,

I have an existing soap client and for that client, I have to build a
soap server. I'm building the server in SOAP::Lite. The client has
already been built in another language and the code can not be
changed.
From the documentation I know that the client calls a function
OpenSession on the server with 3 parameters: session_key username and
password.
Based on this information I wrote the soap server:

   #!perl -w

   use SOAP::Transport::HTTP;
   #use Demo;

   # don't want to die on 'Broken pipe' or Ctrl-C
   $SIG{PIPE} = $SIG{INT} = 'IGNORE';
   my $daemon = SOAP::Transport::HTTP::Daemon
     -> new (LocalPort => 80)
     -> dispatch_to('Demo')
   ;
   print "Contact to SOAP server at ", $daemon->url, "\n";
   $daemon->handle;

   package Demo;
   sub OpenSession {
	 my ($class, $key, $name, $password) = @_;
	 print("session_key = $key, username = $name, password =
$password\n");
	 my $id = 2;
	 return($id);
   }

When I tested it to work with the client, it doesn't seem to pick up
the parameters correctly. Although the OpenSession subroutine is
called on the server, the parameters have the wrong values:

The first parameter ($key), has a piece of xml as a value and the
other 2 parameters have no value at all. The print command gives:

session_key = <?xml version="1.0" encoding="UTF-8" ?>
                <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xs
i:noNamespaceSchemaLocation="OpenSession.xsd">
                <session key="marcel" />
                <user name="van vuure" password="holland" />
              </request>
, username = , password =

The xml sent by the non-SOAP::Lite client to the server looks like
this:

<soap:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="
	 http://www.w3.org/1999/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
	 <OpenSession xmlns="Demo">
	 <xmlin xsi:type="xsd:string"><?xml version="1.0"
encoding="UTF-8" ?>
                <request
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="OpenSession.xsd">
                <session key="marcel" />
                <user name="van vuure"
password="holland" />
              </request>
	 </xmlin></OpenSession>
    </soap:Body>
</soap:Envelope>


Is this a proper SOAP envelope? Am I not picking up the input
parameters in the right way in the server? What shoud the server look
like to receive this as a functioncall to OpenSession with parameters
session key, user name and password?

I hope somebody can help me with this.

Thanks,

Marcel van Vuure

#2338 From: Keanan Smith <KSmith@...>
Date: Mon Feb 3, 2003 7:51 pm
Subject: RE: beginner's question/Is this a proper SOAP Envelope ?
KSmith@...
Send Email Send Email
 
Umm, kinda, it's *legal* but not what your documentation indicates it is.

It's actually calling the function OpenSession with one paramater, an XML,
the XML *contains* the information you're looking for, So you'll have to
parse that first paramater with an XML parser to get at the actual data (Or,
I suppose, you could cludge it with regexp's, but that's less stable :)



-----Original Message-----
From: vanvuure <marcel_van_vuure@...>
[mailto:marcel_van_vuure@...]
Sent: Monday, February 03, 2003 7:00 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] beginner's question/Is this a proper SOAP Envelope?


Hi,

I have an existing soap client and for that client, I have to build a
soap server. I'm building the server in SOAP::Lite. The client has
already been built in another language and the code can not be
changed.
From the documentation I know that the client calls a function
OpenSession on the server with 3 parameters: session_key username and
password.
Based on this information I wrote the soap server:

   #!perl -w

   use SOAP::Transport::HTTP;
   #use Demo;

   # don't want to die on 'Broken pipe' or Ctrl-C
   $SIG{PIPE} = $SIG{INT} = 'IGNORE';
   my $daemon = SOAP::Transport::HTTP::Daemon
     -> new (LocalPort => 80)
     -> dispatch_to('Demo')
   ;
   print "Contact to SOAP server at ", $daemon->url, "\n";
   $daemon->handle;

   package Demo;
   sub OpenSession {
	 my ($class, $key, $name, $password) = @_;
	 print("session_key = $key, username = $name, password =
$password\n");
	 my $id = 2;
	 return($id);
   }

When I tested it to work with the client, it doesn't seem to pick up
the parameters correctly. Although the OpenSession subroutine is
called on the server, the parameters have the wrong values:

The first parameter ($key), has a piece of xml as a value and the
other 2 parameters have no value at all. The print command gives:

session_key = <?xml version="1.0" encoding="UTF-8" ?>
                <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xs
i:noNamespaceSchemaLocation="OpenSession.xsd">
                <session key="marcel" />
                <user name="van vuure" password="holland" />
              </request>
, username = , password =

The xml sent by the non-SOAP::Lite client to the server looks like
this:

<soap:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="
	 http://www.w3.org/1999/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
	 <OpenSession xmlns="Demo">
	 <xmlin xsi:type="xsd:string"><?xml version="1.0"
encoding="UTF-8" ?>
                <request
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="OpenSession.xsd">
                <session key="marcel" />
                <user name="van vuure"
password="holland" />
              </request>
	 </xmlin></OpenSession>
    </soap:Body>
</soap:Envelope>


Is this a proper SOAP envelope? Am I not picking up the input
parameters in the right way in the server? What shoud the server look
like to receive this as a functioncall to OpenSession with parameters
session key, user name and password?

I hope somebody can help me with this.

Thanks,

Marcel van Vuure


To unsubscribe from this group, send an email to:
soaplite-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#2339 From: Stephen.Rosman@...
Date: Tue Feb 4, 2003 1:31 am
Subject: Re: Stupid Content-Encoding error...
Stephen.Rosman@...
Send Email Send Email
 
I've had a bit of a rummage in the source code,
I've installed it successfully on another server,
I've reinstalled libnet, libwww, SOAP::Lite,
I've got the daemon version working,
I've concluded that it's Apache's fault.

Cheers

--
Stephen Rosman - Parliament House Web Developer - phone: 9651 8490

#2340 From: "vanvuure <marcel_van_vuure@...>" <marcel_van_vuure@...>
Date: Tue Feb 4, 2003 1:48 pm
Subject: Element 'xmlout' can't be allowed in valid XML message. Died\n
vanvuure
Send Email Send Email
 
Hi,

I have got a soap server that has a method 'OpenSession' that should
return a boolean, 'return' and a string 'session id'.

The soap envelope of how the return message should look is this:

<SOAP-ENV:Body><ns:OpenSessionResponse xmlns:ns="zsplat::wsdl"SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	 <return xsi:type="xsd:boolean">true</return>
	 <xmlout xsi:type="xsd:string">
		 <response> <session id="2" /> </response>
	 </xmlout>
</ns:OpenSessionResponse>
</SOAP-ENV:Body>

How do I  build such an envelope?
I tried to do it like this (in the OpenSession function on the
server):
	 return(SOAP::Data->type('boolean')->name('return')->value
(true), SOAP::Data->type('string')->name('xmlout')->value('<response>
<session id=\"2\" /> </response>'));

So I return 2 things, one 'return' and one piece of xml in a string.
But when I test that, the actual reply message from the server to the
client looks like this:

<SOAP-ENV:Body>
   <SOAP-ENV:Fault>
     <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
     <faultstring xsi:type="xsd:string">Element 'xmlout' can't be
allowed in valid XML message. Died
     </faultstring>
     <faultactor xsi:type="xsd:string">http://h3a0433/</faultactor>
   </SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

It complains about the xmlout element. But I need this text there,
otherwise the client won't understand the message. Why can't I
put 'xmlout' there? Is it a reserved word or something?

Marcel van Vuure

#2341 From: Sven Paulus <sven@...>
Date: Tue Feb 4, 2003 9:31 pm
Subject: namespace problems with WSDL file
sven_paulus
Send Email Send Email
 
Hi,

I'm currently trying to use a SOAP::Lite based server (mod_perl) with a
SOAP::Lite based client. However the server complains about namespace
problems:

   SOAP call failed: Application failed during request deserialization:
        Unresolved prefix 'tns' for attribute value 'tns:RecipientList'

This seems to be caused by a malformed message by the client.

My client looks like this (further explanation at the bottom of this mail):

#! /usr/bin/perl

use SOAP::Lite trace => qw(debug);
if (!eval { $soap = SOAP::Lite
         -> service("file:./c.wsdl")
         -> on_fault( sub {
              my($soap,$res)=@_;
              print "SOAP call failed: ".
                (ref $res ? $res->faultstring : $soap->transport->status)."\n";
              exit 1;
            }); 1 }) {
               print "SOAP call failed: couln't fetch WSDL\n";
	       exit 1;
            }
$content="blabla";
$sender="test123\@bla";
@rec=("abc\@def", "xyz\@ghi");

$result = $soap->sendMessage($content,$sender,\@rec);
%re=%{$result};
print "Return: rcode=".$re{"returncode"}.
              " errmsg=".$re{"errormessage"}.
	      " id=".$re{"msgid"}."\n";
if ($re{"returncode"} == 0) {
   print "Success!\n";
} else {
   print "Failure!\n";
}


And this is my WSDL file:

<?xml version="1.0" encoding="UTF-8"?>
<definitions
     xmlns="http://schemas.xmlsoap.org/wsdl/"
     name="mailmessage"
     targetNamespace="urn:mailmessage"
     xmlns:tns="urn:mailmessage"
     xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <wsdl:types xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
         <xsd:schema targetNamespace="urn:mailmessage">
             <xsd:complexType name="RecipientList">
                 <xsd:complexContent>
                     <xsd:restriction base="SOAP-ENC:Array">
                         <xsd:sequence>
                             <xsd:element maxOccurs="unbounded" minOccurs="0"
name="item" type="xsd:string"/>
                         </xsd:sequence>
                         <xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="xsd:string[]"/>
                     </xsd:restriction>
                 </xsd:complexContent>
             </xsd:complexType>
             <xsd:complexType name="sendMessageResult">
                 <xsd:sequence>
                     <xsd:element name="returncode" type="xsd:integer"/>
                     <xsd:element name="errormessage" type="xsd:string"/>
                     <xsd:element name="msgid" type="xsd:string"/>
                 </xsd:sequence>
             </xsd:complexType>
         </xsd:schema>
     </wsdl:types>
     <message name="sendMessageSoapOut">
         <part name="result" type="tns:sendMessageResult"/>
     </message>
     <message name="sendMessageSoapIn">
         <part name="content" type="xsd:string"/>
         <part name="sender" type="xsd:string"/>
         <part name="recipients" type="tns:RecipientList"/>
     </message>

     <portType name="mailmessagePortType">
         <operation name="sendMessage">
             <input message="tns:sendMessageSoapIn"/>
             <output message="tns:sendMessageSoapOut"/>
         </operation>
     </portType>

     <binding name="mailmessageBinding" type="tns:mailmessagePortType">
         <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
         <operation name="sendMessage">
             <soap:operation style="rpc"
soapAction="urn:mailmessage#sendMessage"/>
             <input>
                 <soap:body namespace="urn:mailmessage" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </input>
             <output>
                 <soap:body namespace="urn:mailmessage" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </output>
         </operation>
     </binding>

     <service name="mailmessage">
         <port name="mailmessagePort" binding="tns:mailmessageBinding">
             <soap:address location="http://127.0.0.1/mailgate"/>
         </port>
     </service>
</definitions>

When I'm issueing a request, the XML block looks like this (reformatted for
better readability):

<?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:sendMessage xmlns:namesp1="urn:mailmessage">
         <content xsi:type="xsd:string">blabla</content>
         <sender xsi:type="xsd:string">test123@bla</sender>
         <recipients xsi:type="tns:RecipientList"
SOAP-ENC:arrayType="xsd:string[2]">
           <item xsi:type="xsd:string">abc@def</item>
           <item xsi:type="xsd:string">xyz@ghi</item>
         </recipients>
       </namesp1:sendMessage>
     </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>

The problem is the "tns:RecipientList" type attribute to the recipients
element. xmlns:tns is not declared in the SOAP Envelope. Is there a way get
SOAP::Lite to add all the namespace declarations given in the WSDL
definitions tag? A xlmns:tns="urn:mailmessage" would help, wouldn't it?

One way to fix the problem is this patch to SOAP::Lite:

-- /tmp/Lite.pm        2002-04-16 06:42:48.000000000 +0200
+++ /usr/share/perl5/SOAP/Lite.pm       2003-02-04 21:08:24.000000000 +0100
@@ -2415,7 +2415,7 @@
                my $inputmessage = SOAP::Utils::disqualify($_->input->message);
                foreach ($s->message) {
                  next unless $_->name eq $inputmessage;
-                @parts = $_->part;
+                @parts = SOAP::Utils::disqualify($_->part);
                }
              }
            }

This removes the reference to "tns" from the type attribute.
But I guess this is solving the problem the wrong way (removing the
namespace instead of adding the declaration). I didn't get far looking for
the list of namespaces in SOAP/Lite.pm, somehow these tags aren't imported
by the deserializer.

So, can anybody help me? Is my code wrong? My WSDL file? Or is this one of
the problems caused by the limited WSDL support in SOAP::Lite?


Thanks a lot!

Sven

#2342 From: Duncan Cameron <dcameron@...>
Date: Tue Feb 4, 2003 11:30 pm
Subject: Re: Element 'xmlout' can't be allowed in valid XML message. Died\n
dcameron@...
Send Email Send Email
 
On 2003-02-04 vanvuure  <marcel_van_vuure wrote:
>Hi,
>
>I have got a soap server that has a method 'OpenSession' that should
>return a boolean, 'return' and a string 'session id'.
>
>The soap envelope of how the return message should look is this:
>
><SOAP-ENV:Body><ns:OpenSessionResponse xmlns:ns="zsplat::wsdl"SOAP-
>ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="xsd:boolean">true</return>
> <xmlout xsi:type="xsd:string">
>  <response> <session id="2" /> </response>
> </xmlout>
></ns:OpenSessionResponse>
></SOAP-ENV:Body>
>
>How do I  build such an envelope?
>I tried to do it like this (in the OpenSession function on the
>server):
> return(SOAP::Data->type('boolean')->name('return')->value
>(true), SOAP::Data->type('string')->name('xmlout')->value('<response>
><session id=\"2\" /> </response>'));
>
>So I return 2 things, one 'return' and one piece of xml in a string.
>But when I test that, the actual reply message from the server to the
>client looks like this:
>
><SOAP-ENV:Body>
>  <SOAP-ENV:Fault>
>    <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
>    <faultstring xsi:type="xsd:string">Element 'xmlout' can't be
>allowed in valid XML message. Died
>    </faultstring>
>    <faultactor xsi:type="xsd:string">http://h3a0433/</faultactor>
>  </SOAP-ENV:Fault>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>It complains about the xmlout element. But I need this text there,
>otherwise the client won't understand the message. Why can't I
>put 'xmlout' there? Is it a reserved word or something?
>
It's to do with namespace prefixes which cannot begin with xX|mM|lL.
I can't figure out whether SOAP::Lite is correct in your case, it's a bit too
late at night for me to think clearly.

Seeing this query and your previous one I can't help thinking that you're
not going about this in the right way.  You shouldn't be passing strings of
XML as parameters, at least not for something as simple as you seem to be
trying to do.

Regards,
Duncan Cameron

#2343 From: "Andy Kelk" <andy@...>
Date: Wed Feb 5, 2003 12:27 pm
Subject: SOAP::Lite interoperability with .NET using hrefs
mopoke_uk
Send Email Send Email
 
Hi,

I have searched the list and can't find an exact answer to my question.

I have completed a SOAP::Lite server that works fine when I feed it from
a SOAP::Lite client and from a hand-written XML file. I've now written a
WSDL file and have now created a client using vb.NET

It all runs fine in terms of not throwing any exceptions. But it doesn't
recognise the data. The issue seems to be with references to arrays. The
XML which SOAP::Lite (as a client) produces is something like:


<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <SOAP-ENV:Body>
    <namesp1:VendaCreateProduct xmlns:namesp1="urn:VendaProducts"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <skuElements
xmlns:namesp1="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="namesp1:skuArray" namesp1:arrayType="namesp1:skuElement[1]">
	 <skuElement xsi:type="namesp1:skuElement">
		 .........
	 </skuElement>
     </skuElements>
    </namesp1:VendaCreateProduct>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


This works fine.

The XML created by .Net is:


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:VendaProducts"
xmlns:types="urn:VendaProducts/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <tns:VendaCreateProduct>
     <skuElements href="#id1" />
   </tns:VendaCreateProduct>
<soapenc:Array id="id1" soapenc:arrayType="tns:skuElement[1]">
  <Item href="#id2" />
</soapenc:Array>
<tns:skuElement id="id2" xsi:type="tns:skuElement">
   .........
</tns:skuElement>

When running it this way, my code does not pick up any contents of the
array skuElements.
Is this a problem with how my WSDL file is written? Does .Net always do
this with arrays? Can SOAP::Lite understand these?

Any help would be much appreciated.

Thanks

Andy


--
Andy Kelk
Head of Integration, Venda
andy@...

#2344 From: "somebody8765 <martin.hajduch@...>" <martin.hajduch@...>
Date: Wed Feb 5, 2003 2:39 pm
Subject: passing complex types to axis
somebody8765
Send Email Send Email
 
hi !

i'm getting following error from axis:
    <faultstring>org.xml.sax.SAXException: SimpleDeserializer
encountered a child element, which is NOT expected, in something it
was trying to deserialize.</faultstring>


i have a complex type A; which contains array of complex types B (as a
property called B_array)

i'm receiving the complex type A from axis, and trying to pass it back

in wsdl i can see, that the array of types B is defined like:
<complexType name="ArrayOf_tns1_B"><complexContent><restriction
base="soapenc:Array"><attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:B[]"/></restriction></complexContent></complexType>

in the soap message to the server, i can read something different:

<B_array SOAP-ENC:arrayType="namesp4:B[1]"
xsi:type="namesp5:ArrayOf_tns1_B"><item xsi:type="namesp4:B"/></B_array>

(i left type B empty, to be sure that the problem is not within type B)

however - when i set B_array property (of type A) to an empty array,
it works
then i can read in a soap message to the server:
<B_array SOAP-ENC:arrayType="xsd:anyType[0]" xsi:type="SOAP-ENC:Array"/>

i have tried a load of blessing/typemapping - no success
i've seen in some messages here, that people are passing complex types
to axis without any problems

does anybody have an idea what i'm doing wrong ?

#2345 From: "Andy Kelk" <andy@...>
Date: Wed Feb 5, 2003 4:26 pm
Subject: RE: SOAP::Lite interoperability with .NET using hrefs
mopoke_uk
Send Email Send Email
 
As a follow up to my own message, I can get the data to be recognised if
I get VB.net to use literal style with "wrapped" ParameterStyle.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
   <VendaCreateProduct xmlns="urn:VendaProducts">
     <skuElements>
      <skuElement>
	 ....
      </skuElement>
     </skuElements>
   </VendaCreateProduct xmlns="urn:VendaProducts">
  </soap:Body>
</soap:Envelope>

This is not what I want, however, as the datatypes are lost and I have
no arrays defined.

It seems that the initial XML that .Net produces is valid but that the
hrefs are confusing SOAP::Lite. Is there any way I can get around this?

Thanks

Andy


--
Andy Kelk
Head of Integration, Venda
andy@...

#2346 From: "Dan Grigsby" <dan@...>
Date: Thu Feb 6, 2003 12:42 am
Subject: Re: .NET client Howto
dcgrigsby
Send Email Send Email
 
Hi Jay, others:

This seems like the most frequently asked question, and while it's been
answered in pieces, I thought maybe I could try and package up the
solution all into one post.  This isn't necessarily the best way, or the
right way, but it works for me.

1.  I wrote a WSDL file for each service.  Attached please find one
called ListGroupMembers.wsdl.  Note the segment:

	 <service name="ListGroupMembersService">
		 <port name="ListGroupMembersPort"
binding="tns:ListGroupMembersSoapBinding">
			 <soap:address
location="http://webservices.mozo.com/soap"/>
		 </port>
	 </service>

This will be the URL that the dotNet client asks for.  This will be your
SoapLite server -- the "proxy" in SoapLite terms.

2.  Use wsdle.exe (in the path if you run the VS.Net command prompt) to
create a VB or VC# class for the service.  Add the class to the project
and create an instance of the class.  See MSDE for help on this.

3.  When, in .net, you access the service (in this case by calling the
BeginListGroupMember or ListGroupMembers functions in the class) .net
puts together the request.  The request will include the namespace (in
this case http://webservices.mozo.com/ListGroupMembers) which will be
used by SoapLite to decide which perl package to dispatch to (in this
case the package ListGroupMembers) and will also include the function
(in this case also called ListGroupMembers) to execute.

4. The attached ListGroupMembers.pm file handles request.  The primary
thing to note here is that each element includes the namespace before
the tag inside {} brackets.  SoapLite will use this to qualify the SOAP
response in the appropriate namespace.  This seems to be the big thing
that stops most .net integrations from working.

5. The attached ListGroupMember.pm doesn't do anything with the input.
It's just a stub.  To handle the client's input I like to use the
"byName" capabilities of SoapLite.  You can grab the values of
parameters "by name."  To do this, add:

use vars qw(@ISA);
@ISA = qw(SOAP::Server::Parameters);

In your package declaration, and then to grab the values inside the
function with:

my $SOMEPARAM = SOAP::Server::Parameters::byName(['SOMEPARAM'],@_).

You'll do this after you shift self.

Anyway, it works for me.  Hopefully it helps.

Best,

Dan

-----Original Message-----
From: gartonehome <jgardner@...> [mailto:jgardner@...]
Sent: Wednesday, February 05, 2003 12:49 PM
To: dcgrigsby <dan@...>
Subject: Re: Empty element; xsi:type="xsd:string" attribute -> .NET
client spits up


Just out of curiousity. Have you documented the necessary steps to
get VB.Net client to talk to the SOAP::Lite server? I am interested
in doing this, but do not have much time to figure it out. I have
gotten SOAP::Lite to talk to the VB.NET server, but not the other way
around. I am new to .NET (old to perl and java) and am not even sure
how to get the client to see the SOAP::Lite service. If you or anyone
else could enumerate the step I would be very grateful.

Best Regards,

--Jay Gardner



--- In soaplite@yahoogroups.com, "dcgrigsby <dan@u...>" <dan@u...>
wrote:
> Hi,
>
> I'm successfully using a VB.Net client with a Soap::Lite based
> server.  I've run into a problem that doesn't appear to be one of
> the .NET FAQs, so I thought I'd ask:
>
> I am trying to return an empty tag with a single attribute.  I use
>
> return SOAP::Data
> ->name("{http://webservices.mozo.com/LookUp}Item" => "")
> ->attr({"{http://webservices.mozo.com/LookUp}key" => "somekey"})
> ;
>
> The service returns the following element (extracted from the
> headers):
>
> <namesp2:Item namesp3:key="somekey" xsi:type="xsd:string"
> xmlns:namesp2="http://webservices.mozo.com/LookUp"/>
>
> .NET spits up because of the xsi:type attribute in there.  I used
> the full results to write a CGI to output the soap message,
stripped
> out the xsi:type attribute and it works.
>
> So the question is: how can I get an empty element with out having
> a xsi:type attribute?
>
> Thanks,
>
> Dan

#2347 From: "msanesh <anesh@...>" <anesh@...>
Date: Fri Feb 7, 2003 5:40 am
Subject: Re: passing complex types to axis
msanesh
Send Email Send Email
 
This usually means that something is not being passed with the right
type. Make sure that each element of the array is being passed as the
right type. It looks like B is not being passed in as type B.

  Also, maptype B to right namespace.

in your case
  my $b = bless {
             # B members
             } => 'B
  my @a = [$b];

  Hope this helps.
  Anesh.

--- In soaplite@yahoogroups.com, "somebody8765 <martin.hajduch@a...>"
<martin.hajduch@a...> wrote:
> hi !
>
> i'm getting following error from axis:
>    <faultstring>org.xml.sax.SAXException: SimpleDeserializer
> encountered a child element, which is NOT expected, in something it
> was trying to deserialize.</faultstring>
>
>
> i have a complex type A; which contains array of complex types B
(as a
> property called B_array)
>
> i'm receiving the complex type A from axis, and trying to pass it
back
>
> in wsdl i can see, that the array of types B is defined like:
> <complexType name="ArrayOf_tns1_B"><complexContent><restriction
> base="soapenc:Array"><attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns1:B
[]"/></restriction></complexContent></complexType>
>
> in the soap message to the server, i can read something different:
>
> <B_array SOAP-ENC:arrayType="namesp4:B[1]"
> xsi:type="namesp5:ArrayOf_tns1_B"><item
xsi:type="namesp4:B"/></B_array>
>
> (i left type B empty, to be sure that the problem is not within
type B)
>
> however - when i set B_array property (of type A) to an empty array,
> it works
> then i can read in a soap message to the server:
> <B_array SOAP-ENC:arrayType="xsd:anyType[0]" xsi:type="SOAP-
ENC:Array"/>
>
> i have tried a load of blessing/typemapping - no success
> i've seen in some messages here, that people are passing complex
types
> to axis without any problems
>
> does anybody have an idea what i'm doing wrong ?

#2348 From: "msanesh <anesh@...>" <anesh@...>
Date: Fri Feb 7, 2003 5:47 am
Subject: memory leak?
msanesh
Send Email Send Email
 
I have seem the process size grow in perl when multiple soap
operations. I thought this was my script, but I tried it with the
google API as well.

  The code I have is

for($i=0;$i<50;$i++) {
# use GoogleSearch.wsdl file from Google developer's kit
my $google = SOAP::Lite->service
('file:/tmp/ws/googleapi/GoogleSearch.wsdl');
my $result = $google->doGoogleSearch(
   $key, $query, 0, 10, 'false', '', 'false', '', 'latin1', 'latin1');

die $google->call->faultstring if $google->call->fault;
print "About $result->{'estimatedTotalResultsCount'} results.\n";

print $i."\n";
}

The process size grows from about 6k to 8.5k

I have perl version 5.6.1, soaplite version 0.55 running on Redhat
Linux 7.2

  Am I doing something wrong?

  Thanks,
  Anesh.

#2349 From: "Martin Hajduch" <martin.hajduch@...>
Date: Fri Feb 7, 2003 10:19 am
Subject: RE: Re: passing complex types to axis
somebody8765
Send Email Send Email
 
>  Also, maptype B to right namespace.

this was the problem, thanks !
however - i'm just wondering, that even as i was mapping B to the wrong
namespace, if it was empty, it was not a problem (for axis)

by the way - currently i'm not only blessing A & B types, but i have also
to recreate all xsd:string values which contain number (since perl will
send them as xsd:integer)
isn't there an easy way to do this ? i mean - some function which would
retype the whole structures using wsdl ?
i was trying to find something but without success :(

thanks,
martin

#2350 From: "websocket <websocket@...>" <websocket@...>
Date: Sat Feb 8, 2003 2:13 pm
Subject: sending back a string array
websocket
Send Email Send Email
 
I'm new to SOAP so I thought I would start with SOAP::Lite.  What's
the syntax for sending back an array of strings.  I tried something
like the following:

my @arr = ();
push @arr, "String 1";
push @arr, "String 2";
return @arr;

Note:  The client will be MS .Net.

thanks

#2351 From: Martin Keller <martin2901de@...>
Date: Sun Feb 9, 2003 2:47 pm
Subject: Unsupported protocol HTTP
martin2901de
Send Email Send Email
 
Hi list,

yesterday I bought the O'Reilley Book "Web Services
with Perl" from
Ray/Kulchenko. I am a newbie and was suprised how easy
web services can be
when I saw at the sixth page a script using XMLRPC. I
downloaded the needed
modules and started the script. The script uses
XMLRPC::Lite which in turn
uses SOAP::Lite.
Now reality faces me with error message "Unsupported
protocol 'HTTP'".
I have the hope that this is a typical newbie problem
and there is just
something wrong with my setup. Only found hints in the
list concerning MAILTO

I use Win98 with AOL 5.0. - ok ok not the up
to date environment but I dont see any reason why it
should not work, since I
can ping www.oreillynet.com defined as the
client-proxy. Attachment contains
the script.

Any help appreciated

Martin



__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de

#2352 From: "Randy J. Ray" <rjray@...>
Date: Sun Feb 9, 2003 10:00 pm
Subject: Re: Unsupported protocol HTTP
rjray_perl
Send Email Send Email
 
> yesterday I bought the O'Reilley Book "Web Services
> with Perl" from
> Ray/Kulchenko. I am a newbie and was suprised how easy
> web services can be

Paul and I thank you. :-)

> Now reality faces me with error message "Unsupported
> protocol 'HTTP'".
> I have the hope that this is a typical newbie problem
> and there is just
> something wrong with my setup. Only found hints in the
> list concerning MAILTO

Do you have the LWP (aka libwww-perl) package installed? I don't remember if
SOAP::Lite requires it for installation, or just encourages it. But it is
needed to provide the HTTP transport layer.

Try installing LWP (and the support libs it needs) and trying the script
again. I don't know if you're using the ActiveState Perl distribution and
installer, but they have packages for all the parts you need.

Randy
--
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Randy J. Ray        Campbell, CA    http://www.rjray.org    rjray@...

Silicon Valley Scale Modelers: http://www.svsm.org

#2353 From: "Randy J. Ray" <rjray@...>
Date: Sun Feb 9, 2003 10:12 pm
Subject: Re: sending back a string array
rjray_perl
Send Email Send Email
 
On 2003.02.08 06:13 websocket <websocket@...> wrote:
> I'm new to SOAP so I thought I would start with SOAP::Lite.  What's
> the syntax for sending back an array of strings.  I tried something
> like the following:
>
> my @arr = ();
> push @arr, "String 1";
> push @arr, "String 2";
> return @arr;
>
> Note:  The client will be MS .Net.

Because of the different ways you can express arrays in XML Schema and WSDL,
there is no one answer to this. The fact that you are writing to .Net is more
meaningful. The client will be expecting that you adhere to the styles of WSDL
(in fact, the client will probably expect you to provide a WSDL description
for your service).

This isn't an easy answer, and probably not a good thing for someone just
starting out. First off, you are probably best off by writing the library as a
non-web-service library, then write a wrapper lib for it that does the
management of conversions. This makes it easier to use your core library in
non-.Net environments. Second, rather than a list you should return a list
reference. Your array is a single parameter, from the viewpoint of the web
service. Because of Perl's relaxed treatment of scalars, lists, and argument
lists, the array could be interpreted as two separate return values.

Once you are returning a list ref, the real fun begins. You should in fact be
returning a blessed reference, because .Net services expect everything to be
objects and classes. The good thing is, it makes the next step easier, because
the reference is easily-identified as a specific class of object. The next
consideration is that the default way SOAP::Lite encodes array references
isn't going to be what you want. You'll need to write a serialization routine,
and use the map_type method to associate it with your class.

Sound like an unusual amount of work? Many people who have written clients
against MS .Net services will agree with you wholeheartedly.

Randy
--
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Randy J. Ray        Campbell, CA    http://www.rjray.org    rjray@...

Silicon Valley Scale Modelers: http://www.svsm.org

#2354 From: "Andy Kelk" <andy@...>
Date: Mon Feb 10, 2003 5:38 pm
Subject: RE: SOAP::Lite interoperability with .NET using hrefs
mopoke_uk
Send Email Send Email
 
Hi,

Does anyone have any ideas on this at all?

I've pretty much hit a wall and am about to give up with it. I think I
might have to investigate other SOAP implementations and see if I can
get them to work with .Net




--
Andy Kelk
Head of Integration, Venda
andy@...

> -----Original Message-----
> From: Andy Kelk
> Sent: 05 February 2003 16:27
> To: soaplite@yahoogroups.com
> Subject: RE: [soaplite] SOAP::Lite interoperability with .NET
> using hrefs
>
>
> As a follow up to my own message, I can get the data to be
> recognised if I get VB.net to use literal style with
> "wrapped" ParameterStyle.
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <soap:Body>
>   <VendaCreateProduct xmlns="urn:VendaProducts">
>     <skuElements>
>      <skuElement>
>  ....
>      </skuElement>
>     </skuElements>
>   </VendaCreateProduct xmlns="urn:VendaProducts">
>  </soap:Body>
> </soap:Envelope>
>
> This is not what I want, however, as the datatypes are lost
> and I have no arrays defined.
>
> It seems that the initial XML that .Net produces is valid but
> that the hrefs are confusing SOAP::Lite. Is there any way I
> can get around this?
>
> Thanks
>
> Andy
>
>
> --
> Andy Kelk
> Head of Integration, Venda
> andy@...
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA> /W6uqlB/TM
>
>
> --------------------------------------------------------------
> -------~->
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>

#2355 From: "msanesh <anesh@...>" <anesh@...>
Date: Mon Feb 10, 2003 9:54 pm
Subject: Re: SOAP::Lite interoperability with .NET using hrefs
msanesh
Send Email Send Email
 
I don't have direct relation with what you are trying, but I had a
similar problem.

  I had soaplite client talking to apache axis server. The apache
axis server was sending back multi refs (hrefs) which could not be
understood by soaplite. However there was a way to turnoff mutirefs
in apache axis and that fixed my problem. I do not know how to turn
it off in .net.

  Anesh.

--- In soaplite@yahoogroups.com, "Andy Kelk" <andy@v...> wrote:
> Hi,
>
> Does anyone have any ideas on this at all?
>
> I've pretty much hit a wall and am about to give up with it. I
think I
> might have to investigate other SOAP implementations and see if I
can
> get them to work with .Net
>
>
>
>
> --
> Andy Kelk
> Head of Integration, Venda
> andy@v...
>
> > -----Original Message-----
> > From: Andy Kelk
> > Sent: 05 February 2003 16:27
> > To: soaplite@yahoogroups.com
> > Subject: RE: [soaplite] SOAP::Lite interoperability with .NET
> > using hrefs
> >
> >
> > As a follow up to my own message, I can get the data to be
> > recognised if I get VB.net to use literal style with
> > "wrapped" ParameterStyle.
> >
> > <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >  <soap:Body>
> >   <VendaCreateProduct xmlns="urn:VendaProducts">
> >     <skuElements>
> >      <skuElement>
> >  ....
> >      </skuElement>
> >     </skuElements>
> >   </VendaCreateProduct xmlns="urn:VendaProducts">
> >  </soap:Body>
> > </soap:Envelope>
> >
> > This is not what I want, however, as the datatypes are lost
> > and I have no arrays defined.
> >
> > It seems that the initial XML that .Net produces is valid but
> > that the hrefs are confusing SOAP::Lite. Is there any way I
> > can get around this?
> >
> > Thanks
> >
> > Andy
> >
> >
> > --
> > Andy Kelk
> > Head of Integration, Venda
> > andy@v...
> >
> > ------------------------ Yahoo! Groups Sponsor
> > ---------------------~--> Get 128 Bit SSL Encryption!
> > http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA> /W6uqlB/TM
> >
> >
> > --------------------------------------------------------------
> > -------~->
> >
> > To unsubscribe from this group, send an email to:
> > soaplite-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
> >

#2356 From: "msanesh <anesh@...>" <anesh@...>
Date: Mon Feb 10, 2003 10:57 pm
Subject: how to set http timeout?
msanesh
Send Email Send Email
 
Does anyone know how to set the http timeout in soaplite?

Thanks,
Anesh.

#2357 From: "websocket <websocket@...>" <websocket@...>
Date: Tue Feb 11, 2003 3:34 am
Subject: .Net client SOAP Lite Server complex types example
websocket
Send Email Send Email
 
Has anyone done this?  I need an example.

#2358 From: "Randy J. Ray" <rjray@...>
Date: Tue Feb 11, 2003 4:33 am
Subject: Re: SOAP::Lite interoperability with .NET using hrefs
rjray_perl
Send Email Send Email
 
(Apologies to Andy for the duplication, I forgot to Cc soaplite)

> Does anyone have any ideas on this at all?
>
> I've pretty much hit a wall and am about to give up with it. I think I
> might have to investigate other SOAP implementations and see if I can
> get them to work with .Net

Similar to the response I gave a few days ago concerning arrays, the style
.Net is expecting to see structures in is not the same as what SOAP::Lite
defaults to. In general, you would need to plug in a routine to serialize your
data, and you would be best-served by having the hashref be blessed, so that
you can associate this with a specific class, and not just all hashrefs.

See the SOAP::Serializer heading in the SOAP::Lite manual page. I realize this
isn't as helpful as you may have hoped, but I haven't done a lot of .Net
stuff, either. Some, but not a lot.

Randy
--
rjray@...          http://www.rjray.org         http://www.svsm.org

Any spammers auto-extracting addresses from this message will definitely want
to include uce@... and report@...

#2359 From: "Randy J. Ray" <rjray@...>
Date: Tue Feb 11, 2003 4:39 am
Subject: Re: how to set http timeout?
rjray_perl
Send Email Send Email
 
On 2003.02.10 14:57 msanesh <anesh@...> wrote:
> Does anyone know how to set the http timeout in soaplite?

SOAP::Lite uses the LWP::UserAgent class for HTTP. Any options you would pass
to LWP::UserAgent->new() you can pass in the proxy() method of SOAP::Lite:

          my $soap = SOAP::Lite->new->proxy($url, timeout => 30, ...);

sets a 30-second timeout.

Randy
--
rjray@...          http://www.rjray.org         http://www.svsm.org

Any spammers auto-extracting addresses from this message will definitely want
to include uce@... and report@...

#2360 From: Duncan Cameron <dcameron@...>
Date: Tue Feb 11, 2003 6:53 am
Subject: RE: SOAP::Lite interoperability with .NET using hrefs
dcameron@...
Send Email Send Email
 
On 2003-02-10 Andy Kelk wrote:
>Hi,
>
>Does anyone have any ideas on this at all?
>
>I've pretty much hit a wall and am about to give up with it. I think I
>might have to investigate other SOAP implementations and see if I can
>get them to work with .Net
>
>
>
>
>--
>Andy Kelk
>Head of Integration, Venda
>andy@...
>
>> -----Original Message-----
>> From: Andy Kelk
>> Sent: 05 February 2003 16:27
>> To: soaplite@yahoogroups.com
>> Subject: RE: [soaplite] SOAP::Lite interoperability with .NET
>> using hrefs
>>
>>
>> As a follow up to my own message, I can get the data to be
>> recognised if I get VB.net to use literal style with
>> "wrapped" ParameterStyle.
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>  <soap:Body>
>>   <VendaCreateProduct xmlns="urn:VendaProducts">
>>     <skuElements>
>>      <skuElement>
>>  ....
>>      </skuElement>
>>     </skuElements>
>>   </VendaCreateProduct xmlns="urn:VendaProducts">
>>  </soap:Body>
>> </soap:Envelope>
>>
>> This is not what I want, however, as the datatypes are lost
>> and I have no arrays defined.
>>
>> It seems that the initial XML that .Net produces is valid but
>> that the hrefs are confusing SOAP::Lite. Is there any way I
>> can get around this?
>>
>> Thanks
>>
>> Andy
>>
I had a play-around with the xml you showed in your original post and SOAP::Lite
doesn't seem to have a problem with hrefs.
==================
my $xml = <<'END';
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:VendaProducts"
xmlns:types="urn:VendaProducts/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:VendaCreateProduct>
<skuElements href="#id1" />
</tns:VendaCreateProduct>
<soapenc:Array id="id1" soapenc:arrayType="tns:skuElement[3]">
<Item href="#id2" />
<Item href="#id3" />
<Item href="#id4" />
</soapenc:Array>
<tns:skuElement id="id2" xsi:type="tns:skuElement">24</tns:skuElement>
<tns:skuElement id="id3" xsi:type="tns:skuElement">36</tns:skuElement>
<tns:skuElement id="id4" xsi:type="tns:skuElement">48</tns:skuElement>
</soap:Body>
</soap:Envelope>
END

my $ds = SOAP::Deserializer->new;

my $som = $ds->deserialize($xml);
my $sku = $som->dataof("/Envelope/Body/VendaCreateProduct/skuElements");
print "@{$sku->value}";
==================
this prints:-

  24 36 48

but I had to create a custom deserializer for the skuEelement.  Did you create
one
when you sent your orignal post?

Regards,
Duncan Cameron

#2361 From: Martin Hajduch <martin.hajduch@...>
Date: Tue Feb 11, 2003 8:00 am
Subject: RE: SOAP::Lite interoperability with .NET using hrefs
somebody8765
Send Email Send Email
 
> I had a play-around with the xml you showed in your original post and
SOAP::Lite
> doesn't seem to have a problem with hrefs.

i have to confirm this
i have axis server returning an array of complex types as hrefs and i haven't
encountered
any problems (with hrefs) on the client side (SOAP::Lite)
i'm even not using my own deserializer

regards,
martin

#2362 From: "Andy Kelk" <andy@...>
Date: Tue Feb 11, 2003 11:21 am
Subject: RE: SOAP::Lite interoperability with .NET using hrefs
mopoke_uk
Send Email Send Email
 
Hi all,

Thanks ever so much for all of the replies. It certainly gave me some
new ammo to fire at the problem and I have now found a solution. I have
succesfully had a .Net client interact and perform its desired actions
with the SOAP::Lite server.

Thanks once again to all who helped out. :-)

Andy


--
Andy Kelk
Head of Integration, Venda
andy@...

#2363 From: "fulkohew <fulkohew@...>" <fulkohew@...>
Date: Tue Feb 11, 2003 3:02 pm
Subject: debugging servers appears to be blind
fulkohew
Send Email Send Email
 
When I'm writting perl based SOAP servers and there is a typo I don't
get any error messages from the compiler, either at compile time or
run time.  All I know (can see) is that I don't get the output I expect.

This makes debugging very tedious.

Its maybe because I'm using auto-dispatching, but I'm flying blind
and don't know where to start to try to get syntax error messages
back.  I don't even know what test code to post to show an example of
my issue.

Any help would be appreciated.
TIA
Fulko

#2364 From: Keanan Smith <KSmith@...>
Date: Tue Feb 11, 2003 5:10 pm
Subject: RE: debugging servers appears to be blind
KSmith@...
Send Email Send Email
 
All of the warnings/errors from every source go *somewhere*, where depends
on in what context you call them.

For instance,

In SOAP Server:

Any 'Die' Statements which happen *in dispatched code* get caught (Via eval
and $@) and passed back to the client as a faultstring,

Any Compile time error statements happen normally (Ie. get sent to the
console of the server, or STDERR, more accurately, (I personally redirect
this to a log, it's nice for debugging that way.))

Any 'warnings' also go to STDERR, as normal (see above :)

Any system-type errors go into the appropriate system error variable, as
per-normal (For instance $! and $^E for OS specific stuff)

On the *client* side, everything should happen normally.

So I have to assume if you aren't seeing your error messages, 1 of 3 things
is true:

1. You're executing code in an eval yourself, and not checking $@,

2. You're 'dying' out of executed (dispatched) code server-side, but the
client isn't checking the faultstring.

3. You're experiencing server-side compile-time errors (or warnings), but
don't have a console for the errors to appear in.

possibly some combination of the 3 :)



-----Original Message-----
From: fulkohew <fulkohew@...> [mailto:fulkohew@...]
Sent: Tuesday, February 11, 2003 8:03 AM
To: soaplite@yahoogroups.com
Subject: [soaplite] debugging servers appears to be blind



When I'm writting perl based SOAP servers and there is a typo I don't
get any error messages from the compiler, either at compile time or
run time.  All I know (can see) is that I don't get the output I expect.

This makes debugging very tedious.

Its maybe because I'm using auto-dispatching, but I'm flying blind
and don't know where to start to try to get syntax error messages
back.  I don't even know what test code to post to show an example of
my issue.

Any help would be appreciated.
TIA
Fulko




To unsubscribe from this group, send an email to:
soaplite-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

Messages 2335 - 2364 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