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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 3000 - 3029 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3000 From: "gnawed" <gnawed@...>
Date: Tue Sep 16, 2003 4:26 am
Subject: Server charset encoding
gnawed
Send Email Send Email
 
How do I set the charset for the server to something other than utf-8?

I see that a client can be set like:

$client = SOAP::Lite->encoding('iso-8859-1');


I'm using Apache::SOAP.  I tried the following w/o luck:

<Location /API/Test>
   SetHandler perl-script
   PerlHandler Apache::SOAP
   PerlSetVar dispatch_to "NTF::API::Test"
   PerlSetVar encoding 'iso-8859-1'
</Location>

I have a feeling that this tries to set the encoding URN like
http://schemas.xmlsoap.org/soap/encoding/

#3001 From: Mark Cance <mark@...>
Date: Tue Sep 16, 2003 9:57 am
Subject: Re: Segfault
mscance
Send Email Send Email
 
That fixed it!!! Thanks Paul!

Best
Mark.

On 15/9/03 5:01 pm, "Paul Kulchenko" <paulclinger@...> wrote:

> Mark,
>
> The only things that comes to mind is to look at the "Apache is
> crashing with segfaults" section:
> http://theoryx5.uwinnipeg.ca/CPAN/data/SOAP-Lite/SOAP/Transport/HTTP.html#TROU
> BLESHOOTING
>
> Best wishes, Paul.
>
> --- Mark Cance <mark@...> wrote:
>> Hi,
>>
>> I've gone back and done a clean install of everything. Once again
>> apache,
>> mod_perl and my other apps work fine but when I issue a request to
>> my
>> service via Apache::SOAP I get a seg fault in my apache logs.
>>
>> I have no idea what's the cause. Byrne I tried to hook into a http
>> process
>> and debug without much luck; I did a 'top', got a PID of a httpd
>> process and
>> tried to run it, either the process STATE=stop or gdb returned 'No
>> executable file specified' after typing run... Forgive me for
>> sounding
>> stupid but I'm a gdb newbie!!
>>
>> Any ideas on the cause would be really welcome as this has me
>> really
>> scratching my head!!
>>
>> Here's how I compiled apache/mod_ssl and mod_perl, (this setup has
>> worked
>> for me many times in the past)
>>
>> #config mod_ssl
>> $ cd mod_ssl-2.8.x-1.3.x
>> $ ./configure --with-apache=../apache_1.3.26
>> $ cd..
>>
>> #mod_perl
>> $ cd mod_perl-1.27
>> $ perl Makefile.PL \
>> #EVERYTHING=1 \
>> #USE_APACI=1 \
>> #DYNAMIC=1 \
>> #APACHE_PREFIX=/usr/local/apache \
>> #APACHE_SRC=../apache_1.3.26/src \
>> #DO_HTTPD=1 \
>> #APACI_ARGS="--enable-module=so --enable-shared=info
>> --enable-shared=proxy
>> --enable-shared=rewrite --enable-shared=log_agent"
>> $ make
>> $ make install
>>
>> #apache
>> $ cd ../apache_1.3.26
>> $ SSL_BASE=SYSTEM \
>> ./configure \
>> --prefix=/usr/local/apache \
>> --enable-module=ssl \
>> --activate-module=src/modules/perl/libperl.a \
>> --enable-module=perl \
>> --enable-module=so \
>> --enable-shared=info \
>> --enable-shared=proxy \
>> --enable-shared=rewrite \
>> --enable-shared=log_agent
>> $ make
>> $ make install
>>
>>
>> On 11/9/03 2:49 pm, "Byrne Reese" <byrne@...> wrote:
>>
>>> I am not necessarily saying you are wrong - but I am not
>> convinced that
>>> SOAP::Lite is causing the segfault - in my experience, segfaults
>> typically
>>> come from compiled code, which SOAP::Lite it not. Chances are,
>> mod_perl is
>>> coring.
>>>
>>> Check your config - and gdb on your httpd process. It's easy:
>>>
>>> * start apache and wait for the httpd processes to spin up
>>> * do a `ps -aef` and find the pid number of one of the httpd
>> processes
>>> * run `gdb <pid>`
>>> * then type 'run'
>>> * hit your apache server with .NET until the process you attached
>> yourself
>>> to cores, then type 'bt'
>>>
>>> You will most likely see that mod_perl is the culprit - when it
>> is, it is
>>> usually due to a bad install... try recompiling mod_perl (make
>> clean
>>> first)...
>>>
>>>
>>>> SOAP::Lite is working really well on our development servers.
>> However I?ve
>>>> just moved the code to our production machines and it seems to
>> be causing
>>>> a
>>>> segfault.
>>>>
>>>> I?m using, BSD, mod_perl-1.27, perl-5.8.0 and SOAP-Lite-0.55,
>> with
>>>> Apache::SOAP providing the transport. My apache error logs show;
>> [Wed Sep
>>>> 10
>>>> 17:26:19 2003] [notice] child pid 27240 exit signal Segmentation
>> fault
>>>> (11)
>>>>
>>>> My SOAP client (.NET WebService Studio), returns the exception;
>>>> System.Reflection.TargetInvocationException: Exception has been
>> thrown by
>>>> the target of an invocation. ---> System.Net.WebException: The
>> underlying
>>>> connection was closed: An unexpected error occurred on a
>> receive.
>>>>
>>>> This seems confirm the segfault. Any ideas on the cause would be
>> very,
>>>> very
>>>> welcome!
>>>>
>>>> Mark
>>>>
>>>>
>>>
>>>
>>> ^byrne :/
>>>
>>
>>
>> ------------------------ Yahoo! Groups Sponsor
>>
>> 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/
>>
>>
>
>

#3002 From: "mpafrica2001" <yahoo@...>
Date: Tue Sep 16, 2003 3:46 pm
Subject: Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)
mpafrica2001
Send Email Send Email
 
Apologies for the length of this message but I've tried to include
everything relevent. Unfortunately, I can't make the web service
available outside our firewall.

I'm trying to communicate with a WSDL based service on
an MS SOAP server. If anybody has done that and can
share code or ideas, I'd love to see it.

I've found a lot of documentation on how to talk to .NET SOAP
(which I have working) but very little about the MS SOAP
toolkit (which I haven't).

I've been given an XML trace of a successful session with a VB
client which I include below. I've also included the WSDL.

Client: SOAP::Lite 0.60
Server: MS SOAP toolkit (version 3 I believe)

FaultCode: SOAP-ENV:Server
FaultString: SoapMapper: Restoring data into SoapMapper
anyType failed

Notes:

- The error seems fair enough as I am passing strings instead
   of "anyType"s

- The WSDL lists the last two parameters as type anyType.
   Explicitly setting them as such in the SOAP::Data calls
   returns the SOAP::Lite error: Schema/namespace for type
   'anyType' is not specified

- The VB code creates data entries with two xmlns attributes
   (in two different namespaces). I haven't been able to
   generate this with SOAP::Lite. Maybe I need to write
   a custom serializer.

- Any help/suggestions very gratefully received.

Perl Client code (IP addresses ellided):

use SOAP::Lite +trace => 'debug';

my $service = SOAP::Lite
   ->service('http://IP ADDRESS/webservices/ntlBusiness.wsdl')
   ->readable(1);

my $method = SOAP::Data->name('CheckAvailability')
   ->attr({xmlns => 'http://tempuri.org/ntlBusiness/message/'});

my $av = SOAP::Data->name('strAvailability')
   ->attr({xmlns => 'http://www.w3.org/2001/XMLSchema-instance'})
   ->type('string')->value('');

my $ed = SOAP::Data->name('strEnabledDate')
   ->attr({xmlns => 'http://www.w3.org/2001/XMLSchema-instance'})
   ->type('string')->value('');

my $result = $service->CheckAvailability('PO57 0DE', '01256881234',
$av, $ed)
   ->result;

print STDERR $result;


Perl client XML trace

?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.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:CheckAvailability
xmlns:namesp1="http://tempuri.org/ntlBusiness/message/">
       <strPostCode xsi:type="xsd:string"
       >PO57 0DE</strPostCode>
       <strPhoneNumber xsi:type="xsd:string"
       >01256881234</strPhoneNumber>
       <strAvailability
xmlns="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:string"/>
       <strEnabledDate
xmlns="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:string"/>
</namesp1:CheckAvailability><
/SOAP-ENV:Body>
</SOAP-ENV:Envelope>

VB client xml trace:
----- sent --------
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
   <SOAP-ENV:Envelope
     SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
     <SOAPSDK1:CheckAvailability
       xmlns:SOAPSDK1="http://tempuri.org/ntlBusiness/message/">
       <strPostCode>SL7 1HX</strPostCode>
       <strPhoneNumber>01628474907</strPhoneNumber>
       <strAvailability
         xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:SOAPSDK3="http://www.w3.org/2001/XMLSchema"
         SOAPSDK2:type="SOAPSDK3:string" />
       <strEnabledDate
         xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:SOAPSDK5="http://www.w3.org/2001/XMLSchema"
         SOAPSDK4:type="SOAPSDK5:string" />
     </SOAPSDK1:CheckAvailability>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

----- received --------

   <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
   <SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
   <SOAPSDK1:CheckAvailabilityResponse
xmlns:SOAPSDK1="http://tempuri.org/ntlBusiness/message/">
   <Result>0</Result>
   <strPostCode>SL7 1HX</strPostCode>
   <strPhoneNumber>01628474907</strPhoneNumber>
   <strAvailability
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://www.w3.org/2001/XMLSchema"
SOAPSDK2:type="SOAPSDK3:string">G</strAvailability>
   <strEnabledDate
xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK5="http://www.w3.org/2001/XMLSchema"
SOAPSDK4:type="SOAPSDK5:string" />
   </SOAPSDK1:CheckAvailabilityResponse>
   </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>

WSDL (IP addresses ellided):

   <?xml version="1.0" encoding="UTF-8" ?>
- <!--  Generated 08/13/03 by Microsoft SOAP Toolkit WSDL File
Generator, Version 3.00.1325.0
   -->
- <definitions name="ntlBusiness"
targetNamespace="http://tempuri.org/ntlBusiness/wsdl/"
xmlns:wsdlns="http://tempuri.org/ntlBusiness/wsdl/"
xmlns:typens="http://tempuri.org/ntlBusiness/type/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension"
xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
- <types>
- <schema targetNamespace="http://tempuri.org/ntlBusiness/type/"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
elementFormDefault="qualified">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
   <import namespace="http://schemas.xmlsoap.org/wsdl/" />
   <import namespace="http://schemas.xmlsoap.org/ws
/2002/04/reference/" />
   <import
namespace="http://schemas.xmlsoap.org/ws/2002/04/content-type/" />
   </schema>
   </types>
- <message name="SOAPAPI.CheckAvailability">
   <part name="strPostCode" type="xsd:string" />
   <part name="strPhoneNumber" type="xsd:string" />
   <part name="strAvailability" type="xsd:anyType" />
   <part name="strEnabledDate" type="xsd:anyType" />
   </message>
- <message name="SOAPAPI.CheckAvailabilityResponse">
   <part name="Result" type="xsd:int" />
   <part name="strPostCode" type="xsd:string" />
   <part name="strPhoneNumber" type="xsd:string" />
   <part name="strAvailability" type="xsd:anyType" />
   <part name="strEnabledDate" type="xsd:anyType" />
   </message>
- <message name="SOAPAPI.RetrieveSubscriberInformation">
   <part name="strUserName" type="xsd:string" />
   <part name="lngSuNumber" type="xsd:int" />
   </message>
- <message name="SOAPAPI.RetrieveSubscriberInformationResponse">
   <part name="Result" type="xsd:string" />
   <part name="strUserName" type="xsd:string" />
   <part name="lngSuNumber" type="xsd:int" />
   </message>
- <message name="SOAPAPI.OrderADSLForExistingSub">
   <part name="lngSuNumber" type="xsd:int" />
   <part name="strCLI" type="xsd:string" />
   <part name="strAltContactNumber" type="xsd:string" />
   <part name="bolUseCurrentPM" type="xsd:boolean" />
   <part name="strPMType" type="xsd:string" />
   <part name="lngCardType" type="xsd:int" />
   <part name="strExpiryDate" type="xsd:string" />
   <part name="strCardNumber" type="xsd:string" />
   <part name="strCardName" type="xsd:string" />
   <part name="strCardAddress" type="xsd:string" />
   <part name="intCardIssueNumber" type="xsd:short" />
   <part name="strDDSortCode" type="xsd:string" />
   <part name="lngDDBankNumber" type="xsd:int" />
   <part name="strDDAccNumber" type="xsd:string" />
   <part name="strDDAccName" type="xsd:string" />
   <part name="strDDBankAddress" type="xsd:string" />
   <part name="strDDBankPostCode" type="xsd:string" />
   <part name="bolPaperMandate" type="xsd:boolean" />
   <part name="intPackageCode" type="xsd:short" />
   <part name="bISDNSwitch" type="xsd:boolean" />
   <part name="strAltEmailAddr" type="xsd:string" />
   <part name="lngReseller" type="xsd:int" />
   </message>
- <message name="SOAPAPI.OrderADSLForExistingSubResponse">
   <part name="Result" type="xsd:int" />
   <part name="lngSuNumber" type="xsd:int" />
   <part name="strCLI" type="xsd:string" />
   <part name="strAltContactNumber" type="xsd:string" />
   <part name="bolUseCurrentPM" type="xsd:boolean" />
   <part name="strPMType" type="xsd:string" />
   <part name="lngCardType" type="xsd:int" />
   <part name="strExpiryDate" type="xsd:string" />
   <part name="strCardNumber" type="xsd:string" />
   <part name="strCardName" type="xsd:string" />
   <part name="strCardAddress" type="xsd:string" />
   <part name="intCardIssueNumber" type="xsd:short" />
   <part name="strDDSortCode" type="xsd:string" />
   <part name="lngDDBankNumber" type="xsd:int" />
   <part name="strDDAccNumber" type="xsd:string" />
   <part name="strDDAccName" type="xsd:string" />
   <part name="strDDBankAddress" type="xsd:string" />
   <part name="strDDBankPostCode" type="xsd:string" />
   <part name="bolPaperMandate" type="xsd:boolean" />
   <part name="intPackageCode" type="xsd:short" />
   <part name="bISDNSwitch" type="xsd:boolean" />
   <part name="strAltEmailAddr" type="xsd:string" />
   <part name="lngReseller" type="xsd:int" />
   </message>
- <message name="SOAPAPI.ArrearsCheck">
   <part name="lngSuNumber" type="xsd:int" />
   <part name="strErrorDescription" type="xsd:anyType" />
   </message>
- <message name="SOAPAPI.ArrearsCheckResponse">
   <part name="Result" type="xsd:int" />
   <part name="lngSuNumber" type="xsd:int" />
   <part name="strErrorDescription" type="xsd:anyType" />
   </message>
- <portType name="SOAPAPISoapPort">
- <operation name="CheckAvailability" parameterOrder="strPostCode
strPhoneNumber strAvailability strEnabledDate">
   <input message="wsdlns:SOAPAPI.CheckAvailability" />
   <output message="wsdlns:SOAPAPI.CheckAvailabilityResponse" />
   </operation>
- <operation name="RetrieveSubscriberInformation"
parameterOrder="strUserName lngSuNumber">
   <input message="wsdlns:SOAPAPI.RetrieveSubscriberInformation" />
   <output
message="wsdlns:SOAPAPI.RetrieveSubscriberInformationResponse" />
   </operation>
- <operation name="OrderADSLForExistingSub"
parameterOrder="lngSuNumber strCLI strAltContactNumber bolUseCurrentPM
strPMType lngCardType strExpiryDate strCardNumber strCardName
strCardAddress intCardIssueNumber strDDSortCode lngDDBankNumber
strDDAccNumber strDDAccName strDDBankAddress strDDBankPostCode
bolPaperMandate intPackageCode bISDNSwitch strAltEmailAddr
lngReseller">
   <input message="wsdlns:SOAPAPI.OrderADSLForExistingSub" />
   <output message="wsdlns:SOAPAPI.OrderADSLForExistingSubResponse" />
   </operation>
- <operation name="ArrearsCheck" parameterOrder="lngSuNumber
strErrorDescription">
   <input message="wsdlns:SOAPAPI.ArrearsCheck" />
   <output message="wsdlns:SOAPAPI.ArrearsCheckResponse" />
   </operation>
   </portType>
- <binding name="SOAPAPISoapBinding" type="wsdlns:SOAPAPISoapPort">
   <stk:binding preferredEncoding="UTF-8" />
   <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="CheckAvailability">
   <soap:operation
soapAction="http://tempuri.org/ntlBusiness/action/
SOAPAPI.CheckAvailability"
/>
- <input>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="strPostCode strPhoneNumber strAvailability strEnabledDate" />
   </input>
- <output>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="Result strPostCode strPhoneNumber strAvailability
strEnabledDate" />
   </output>
   </operation>
- <operation name="RetrieveSubscriberInformation">
   <soap:operation
soapAction="http://tempuri.org/ntlBusiness/action/
SOAPAPI.RetrieveSubscriberInformation"
/>
- <input>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="strUserName lngSuNumber" />
   </input>
- <output>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="Result strUserName lngSuNumber" />
   </output>
   </operation>
- <operation name="OrderADSLForExistingSub">
   <soap:operation
soapAction="http://tempuri.org/ntlBusiness/action/
SOAPAPI.OrderADSLForExistingSub"
/>
- <input>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="lngSuNumber strCLI strAltContactNumber bolUseCurrentPM
strPMType lngCardType strExpiryDate strCardNumber strCardName
strCardAddress intCardIssueNumber strDDSortCode lngDDBankNumber
strDDAccNumber strDDAccName strDDBankAddress strDDBankPostCode
bolPaperMandate intPackageCode bISDNSwitch strAltEmailAddr
lngReseller" />
   </input>
- <output>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="Result lngSuNumber strCLI strAltContactNumber bolUseCurrentPM
strPMType lngCardType strExpiryDate strCardNumber strCardName
strCardAddress intCardIssueNumber strDDSortCode lngDDBankNumber
strDDAccNumber strDDAccName strDDBankAddress strDDBankPostCode
bolPaperMandate intPackageCode bISDNSwitch strAltEmailAddr
lngReseller" />
   </output>
   </operation>
- <operation name="ArrearsCheck">
   <soap:operation
soapAction="http://tempuri.org/ntlBusiness/action/
SOAPAPI.ArrearsCheck"
/>
- <input>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="lngSuNumber strErrorDescription" />
   </input>
- <output>
   <soap:body use="encoded"
namespace="http://tempuri.org/ntlBusiness/message/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
parts="Result lngSuNumber strErrorDescription" />
   </output>
   </operation>
   </binding>
- <service name="ntlBusiness">
- <port name="SOAPAPISoapPort" binding="wsdlns:SOAPAPISoapBinding">
   <soap:address
location="http://IP ADDRESS/webservices/ntlBusiness.WSDL" />
   </port>
   </service>
   </definitions>

--
Michael Brader                             michael.brader@...
Senior Software Developer (Unix)           ntl:ipd
Hook                                       01256 75(3413)

#3003 From: Sadanand Kalasabail <sade_bhat@...>
Date: Wed Sep 17, 2003 2:02 am
Subject: Re: Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)
sade_bhat
Send Email Send Email
 
If you are using a proxyserver you have to send the
proxy logins, the easy way is by setting the env in
the soaplite client script for eg.
$ENV{HTTP_proxy}="http://sk7260:Sadanand43@10.2.19.71:8080";

I have successfully  used it behind the firewall.
There are other options too, see the soaplite toolkit.

Regards

sade



--- mpafrica2001 <yahoo@...> wrote:
> Apologies for the length of this message but I've
> tried to include
> everything relevent. Unfortunately, I can't make the
> web service
> available outside our firewall.
>
> I'm trying to communicate with a WSDL based service
> on
> an MS SOAP server. If anybody has done that and can
> share code or ideas, I'd love to see it.
>
> I've found a lot of documentation on how to talk to
> .NET SOAP
> (which I have working) but very little about the MS
> SOAP
> toolkit (which I haven't).
>
> I've been given an XML trace of a successful session
> with a VB
> client which I include below. I've also included the
> WSDL.
>
> Client: SOAP::Lite 0.60
> Server: MS SOAP toolkit (version 3 I believe)
>
> FaultCode: SOAP-ENV:Server
> FaultString: SoapMapper: Restoring data into
> SoapMapper
> anyType failed
>
> Notes:
>
> - The error seems fair enough as I am passing
> strings instead
>   of "anyType"s
>
> - The WSDL lists the last two parameters as type
> anyType.
>   Explicitly setting them as such in the SOAP::Data
> calls
>   returns the SOAP::Lite error: Schema/namespace for
> type
>   'anyType' is not specified
>
> - The VB code creates data entries with two xmlns
> attributes
>   (in two different namespaces). I haven't been able
> to
>   generate this with SOAP::Lite. Maybe I need to
> write
>   a custom serializer.
>
> - Any help/suggestions very gratefully received.
>
> Perl Client code (IP addresses ellided):
>
> use SOAP::Lite +trace => 'debug';
>
> my $service = SOAP::Lite
>   ->service('http://IP
> ADDRESS/webservices/ntlBusiness.wsdl')
>   ->readable(1);
>
> my $method = SOAP::Data->name('CheckAvailability')
>   ->attr({xmlns =>
> 'http://tempuri.org/ntlBusiness/message/'});
>
> my $av = SOAP::Data->name('strAvailability')
>   ->attr({xmlns =>
> 'http://www.w3.org/2001/XMLSchema-instance'})
>   ->type('string')->value('');
>
> my $ed = SOAP::Data->name('strEnabledDate')
>   ->attr({xmlns =>
> 'http://www.w3.org/2001/XMLSchema-instance'})
>   ->type('string')->value('');
>
> my $result = $service->CheckAvailability('PO57 0DE',
> '01256881234',
> $av, $ed)
>   ->result;
>
> print STDERR $result;
>
>
> Perl client XML trace
>
> ?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
>
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.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:CheckAvailability
>
xmlns:namesp1="http://tempuri.org/ntlBusiness/message/">
>       <strPostCode xsi:type="xsd:string"
>       >PO57 0DE</strPostCode>
>       <strPhoneNumber xsi:type="xsd:string"
>       >01256881234</strPhoneNumber>
>       <strAvailability
> xmlns="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="xsd:string"/>
>       <strEnabledDate
> xmlns="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="xsd:string"/>
> </namesp1:CheckAvailability><
> /SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> VB client xml trace:
> ----- sent --------
> <?xml version="1.0" encoding="UTF-8" standalone="no"
> ?>
>   <SOAP-ENV:Envelope
>
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
>
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>   <SOAP-ENV:Body>
>     <SOAPSDK1:CheckAvailability
>
>
xmlns:SOAPSDK1="http://tempuri.org/ntlBusiness/message/">
>       <strPostCode>SL7 1HX</strPostCode>
>       <strPhoneNumber>01628474907</strPhoneNumber>
>       <strAvailability
>
>
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:SOAPSDK3="http://www.w3.org/2001/XMLSchema"
>         SOAPSDK2:type="SOAPSDK3:string" />
>       <strEnabledDate
>
>
xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:SOAPSDK5="http://www.w3.org/2001/XMLSchema"
>         SOAPSDK4:type="SOAPSDK5:string" />
>     </SOAPSDK1:CheckAvailability>
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> ----- received --------
>
>   <?xml version="1.0" encoding="UTF-8"
> standalone="no" ?>
>   <SOAP-ENV:Envelope
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>   <SOAP-ENV:Body>
>   <SOAPSDK1:CheckAvailabilityResponse
>
xmlns:SOAPSDK1="http://tempuri.org/ntlBusiness/message/">
>   <Result>0</Result>
>   <strPostCode>SL7 1HX</strPostCode>
>   <strPhoneNumber>01628474907</strPhoneNumber>
>   <strAvailability
>
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAPSDK3="http://www.w3.org/2001/XMLSchema"
> SOAPSDK2:type="SOAPSDK3:string">G</strAvailability>
>   <strEnabledDate
>
xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAPSDK5="http://www.w3.org/2001/XMLSchema"
> SOAPSDK4:type="SOAPSDK5:string" />
>   </SOAPSDK1:CheckAvailabilityResponse>
>   </SOAP-ENV:Body>
>   </SOAP-ENV:Envelope>
>
> WSDL (IP addresses ellided):
>
>   <?xml version="1.0" encoding="UTF-8" ?>
> - <!--  Generated 08/13/03 by Microsoft SOAP Toolkit
> WSDL File
> Generator, Version 3.00.1325.0
>   -->
> - <definitions name="ntlBusiness"
>
targetNamespace="http://tempuri.org/ntlBusiness/wsdl/"
> xmlns:wsdlns="http://tempuri.org/ntlBusiness/wsdl/"
> xmlns:typens="http://tempuri.org/ntlBusiness/type/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension"
>
xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
>
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
>
xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> - <types>
> - <schema
>
targetNamespace="http://tempuri.org/ntlBusiness/type/"
> xmlns="http://www.w3.org/2001/XMLSchema"
>
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> elementFormDefault="qualified">
>   <import
>
namespace="http://schemas.xmlsoap.org/soap/encoding/"
> />
>   <import
> namespace="http://schemas.xmlsoap.org/wsdl/" />
>   <import namespace="http://schemas.xmlsoap.org/ws
> /2002/04/reference/" />
>   <import
>
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#3004 From: "jacpad1" <jacoby@...>
Date: Wed Sep 17, 2003 8:41 am
Subject: Problem with encoding
jacpad1
Send Email Send Email
 
Hi,
I try to call via a perl client a GLUE soap service and want to send a
string with special characters (german umlaute). I thought xml is in
use so that the characters are utf8 encoded (by default). But I
receive on the GLUE site a non conform string.
Have i to write my own de- / serializer ?

Somebody able to give me a hint - or a solution ?

Thank you
patrik

#3005 From: "mpafrica2001" <yahoo@...>
Date: Wed Sep 17, 2003 9:38 am
Subject: Re: Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)
mpafrica2001
Send Email Send Email
 
--- In soaplite@yahoogroups.com, Sadanand Kalasabail <sade_bhat@y...>
wrote:
> If you are using a proxyserver you have to send the
> proxy logins, the easy way is by setting the env in
> the soaplite client script for eg.
> $ENV{HTTP_proxy}="http://sk7260:Sadanand43@1...:8080";
>

Thanks Sadanand, but proxying is not my problem. I have no
problemsconnecting with the webservice, I just can't get the
XML formed in a way that MS Soap will accept.

Cheers,

--
Michael Brader                             michael.brader@...
Senior Software Developer (Unix)           ntl:ipd
Hook                                       01256 75(3413)

#3006 From: Duncan Cameron <duncan_cameron2002@...>
Date: Wed Sep 17, 2003 10:46 am
Subject: Re: Problem with encoding
duncan_camer...
Send Email Send Email
 
--- jacpad1 <jacoby@...> wrote:
> Hi,
> I try to call via a perl client a GLUE soap service and want to send
> a
> string with special characters (german umlaute). I thought xml is in
> use so that the characters are utf8 encoded (by default). But I
> receive on the GLUE site a non conform string.
> Have i to write my own de- / serializer ?
>
> Somebody able to give me a hint - or a solution ?
>
Yes Perl does use utf8 internally, but there are plenty of snags and it
will be easier to understand what's going on if you provide an example
of your client. Can you post a small example?

Duncan


________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

#3007 From: "mpafrica2001" <yahoo@...>
Date: Wed Sep 17, 2003 2:40 pm
Subject: Re: Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)
mpafrica2001
Send Email Send Email
 
--- In soaplite@yahoogroups.com, "mpafrica2001" <yahoo@b...> wrote:
> Apologies for the length of this message but I've tried to include
> everything relevent....

I've found solutions to both my problems. To use the
anyType type specifier as found in the WSDL, I used
typelookup to set up the type in SOAP::Lite.

   $service->typelookup->{'anyType'} =
     [11, sub { 1 }, 'as_anyType'];

   sub SOAP::Serializer::as_anyType {
     my $self = shift;
     my ($value, $name, $type, $attr) = @_;
     return [$name, {'xsi:type' => 'xsd:string', %{$attr}}, $value];
   }

and to put multiple xmlns attributes on a data element, I used:

   my $av = SOAP::Data->name('strAvailability')
     ->attr({'xmlns:namesp2' => 'http://www.w3.org/2001/XMLSchema',
             'xmlns:namesp3' =>
                       'http://www.w3.org/2001/XMLSchema-Instance'})
     ->type('anyType')->value('');

A bit of hacking on the on_action sub and I'm now happily talking to
the MS Soap Toolkit server.

Cheers,

--
Michael Brader                             michael.brader@n...
Senior Software Developer (Unix)           ntl:ipd
Hook                                       01256 75(3413)

#3008 From: "testmj444" <testmj444@...>
Date: Wed Sep 17, 2003 3:58 pm
Subject: .net client/soaplite server example
testmj444
Send Email Send Email
 
Hello everyone,

I have looked through the mailing lists and found a couple of
instances where people have attached examples of their client, wsdl
and server scripts that addresses the interoperability between a .net
client and a soaplite server.

I was wondering if someone could either repost those files (like in
post 2346 by Dan Grigsby) or direct me to some working examples of
this particular scenario.  I have been reading all the documentation
and have only found documentation about using a soaplite client to
send requests to .net servers.

Thanks in advance.

#3009 From: "dahven" <dahven@...>
Date: Wed Sep 17, 2003 4:13 pm
Subject: denied access to method
dahven
Send Email Send Email
 
Hi,

I hope someone can help.

Error I'm getting:

<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">SOAP-ENV:Client
   </faultcode>
<faultstring xsi:type="xsd:string">
Denied access to method (findNumbers) in class at (main)
usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 2128.
   </faultstring>
<faultactor xsi:type="xsd:string">http://test.com:8080/
  </faultactor>
  </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

I have see simular problems on this list and others but none of the
work arounds have produced results.

my client.pl program:

   #!/usr/bin/perl

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

   my @params = qw(book1 book2);

   my $s = SOAP::Lite
     -> uri('http://test.com/BookList')
     -> service('file:./BookList.wsdl')
     ;

   my $r = $s->findNumbers(@params);

-----------------------------------
BookList.wsdl:

  <?xml version="1.0" encoding="UTF-8"?>
<definitions
     name="BookList"
     targetNamespace="http://test.com:8080/BookList.wsdl"
     xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:tns="http://test.com:8080/BookList.wsdl"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:xsd1="http://test.ocm:8080/BookList.xsd1">
     <types>
         <xsd:schema
             targetNamespace="http://test.com:8080/BookList.xsd1"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:tns="http://test.com:8080/BookList.wsdl"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:xsd1="http://test.com:8080/BookList.xsd1">
             <xsd:complexType name="BookType">
                 <xsd:all>
                     <xsd:element maxOccurs="1" minOccurs="0"
name="bookNumber" type="xsd:string"/>
                     <xsd:element maxOccurs="1" minOccurs="0"
name="bookStatus" type="xsd:string"/>
                 </xsd:all>
             </xsd:complexType>
          </xsd:schema>
     </types>
     <message name="findNumbersRequest">
         <part name="book1" type="xsd:string"/>
         <part name="author" type="xsd:string"/>
     </message>
     <message name="findNumbersResponse">
         <part name="bookList" type="xsd1:BookTypeArray"/>
     </message>
     <portType name="BookListPortType">
         <operation name="findNumbers">
             <input message="tns:findNumbersRequest"/>
             <output message="tns:findNumbersResponse"/>
         </operation>
     </portType>
     <binding name="BookListBinding" type="tns:BookListPortType">
         <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
         <operation name="findNumbers">
             <soap:operation

soapAction="capeconnect:BookList:BookListPortType#findNumbers"/>
             <input>
                 <soap:body use="literal"/>
             </input>
             <output>
                 <soap:body use="literal"/>
             </output>
         </operation>
     </binding>
     <service name="BookList">
         <port binding="tns:BookListBinding" name="BookListPort">
             <soap:address location="http://test.com:8000/BookList"/>
         </port>
     </service>
</definitions>


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

on server test.com:
my daemon.pl program:

#!/usr/bin/perl -w

use SOAP::Transport::HTTP;
$SIG{PIPE} = $SIG{INT} = 'IGNORE';

my $daemon = SOAP::Transport::HTTP::Daemon
   -> new (LocalPort => 8080)
   -> dispatch_to('/modules')
  ;

print "Contact to soap server at ", $daemon->url, "\n";
$daemon->handle;


#### other lines that wre tried with same result
# -> dispatch_to('/modules', 'BookList')
# -> dispatch_to('/modules/','[\w:]+')
# -> on_action(sub {})

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

the BookList.pm module

package BookList;

sub findNumbers(@) {
   print "@_ \n";

   return @_;
}
1;

#3010 From: "gnawed" <gnawed@...>
Date: Thu Sep 18, 2003 5:46 am
Subject: How do I create an optional string?
gnawed
Send Email Send Email
 
If I have a method that takes two strings, but only the first one is
required:

setName(lastname, firstname)

How do I convey that in the WSDL file?  Do I need to create a new
type?  Or can I use minOccurs/maxOccurs in the <message><part>...

#3011 From: Byrne Reese <byrne@...>
Date: Thu Sep 18, 2003 2:55 pm
Subject: Re: How do I create an optional string?
byrnereese
Send Email Send Email
 
<xsd:complexType name="Fullname">
       <xsd:all>
           <xsd:element maxOccurs="1" minOccurs="0" name="firstname"
type="xsd:string"/>
           <xsd:element maxOccurs="1" minOccurs="0" name="lastname"
type="xsd:string"/>
       </xsd:all>
   </xsd:complexType>

You were on the right track in a previous method where you defined a
data type. That is one way anyway...

On Wed, 2003-09-17 at 22:46, gnawed wrote:
> If I have a method that takes two strings, but only the first one is
> required:
>
> setName(lastname, firstname)
>
> How do I convey that in the WSDL file?  Do I need to create a new
> type?  Or can I use minOccurs/maxOccurs in the <message><part>...
>
>
>
>
>
>                         Yahoo! Groups Sponsor
>                                           ADVERTISEMENT
>                                              click here
>
> 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.
--
Byrne Reese <byrne@...>

#3012 From: Byrne Reese <byrne@...>
Date: Thu Sep 18, 2003 2:57 pm
Subject: Re: What am I doing wrong?
byrnereese
Send Email Send Email
 
It is hard to say if you are doing anything wrong without seeing the
client code. :)

Send that along and I will let you know.

On Fri, 2003-09-12 at 10:33, alpark444 wrote:
> I've got a simple cgi server with client running like one of the
> examples in a tutorial, however, it doesn't print the return.
>
> I tried the +trace=>all option and I can see the output between tags.
> Is there something that I forgot to do?
>
> 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: hi
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Data::new: ()
> SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Request=HASH(0x831b3ac)
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://www.somewhere.com/cgi-bin/hibye.cgi
> Accept: text/xml
> Accept: multipart/*
> Content-Length: 446
> Content-Type: text/xml; charset=utf-8
> SOAPAction: "http://www.somewhere.com/Demo#hi"
>
> <?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:Bod\
y><namesp1:hi
>
xmlns:namesp1="http://www.somewhere.com/Demo"/></SOAP-ENV:Body></SOAP-ENV:Envelo\
pe>
> SOAP::Transport::HTTP::Client::send_receive:
> HTTP::Response=HASH(0x848c520)
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
> Connection: close
> Date: Fri, 12 Sep 2003 17:24:20 GMT
> Server: Apache/2.0.40 (Red Hat Linux)
> Content-Length: 531
> Content-Type: text/xml; charset=utf-8
> Client-Date: Fri, 12 Sep 2003 17:24:20 GMT
> Client-Peer: 10.100.2.178:80
> Client-Response-Num: 1
> SOAPServer: SOAP::Lite/Perl/0.55
>
> <?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:Bod\
y><namesp1:hiResponse
> xmlns:namesp1="http://www.somewhere.com/Demo"><s-gensym3
> xsi:type="xsd:string">hello,
> world</s-gensym3></namesp1:hiResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
> SOAP::Deserializer::deserialize: ()
> SOAP::Parser::decode: ()
> SOAP::SOM::new: ()
> SOAP::Lite::DESTROY: ()
> SOAP::Deserializer::DESTROY: ()
> SOAP::Parser::DESTROY: ()
> SOAP::Transport::DESTROY: ()
> SOAP::Transport::HTTP::Client::DESTROY: ()
> SOAP::Serializer::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::Data::DESTROY: ()
> SOAP::SOM::DESTROY: ()
>
>
>
>                         Yahoo! Groups Sponsor
>                                           ADVERTISEMENT
>                                     Click to learn more...
>
> 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.
--
Byrne Reese <byrne@...>

#3013 From: "gnawed" <gnawed@...>
Date: Thu Sep 18, 2003 9:09 pm
Subject: Re: How do I create an optional string?
gnawed
Send Email Send Email
 
Thanks for the quick reply.

Actually, I'm looking for a solution that doesn't involve a "wrapper"
element, i.e. your solution would change my original call into
something like:

setName(aFullname)

where 'aFullname' is of type Fullname.


I want to have a call like:

setName(lastname, firstname)

where both params are strings, but the WSDL file will define the
input message as having an optional 2nd param.

Is this possible?  Is it necessary?  i.e. can I call this method w/o
the firstname and not get an error?

--- In soaplite@yahoogroups.com, Byrne Reese <byrne@m...> wrote:
>   <xsd:complexType name="Fullname">
>       <xsd:all>
>           <xsd:element maxOccurs="1" minOccurs="0" name="firstname"
> type="xsd:string"/>
>           <xsd:element maxOccurs="1" minOccurs="0" name="lastname"
> type="xsd:string"/>
>       </xsd:all>
>   </xsd:complexType>
>
> You were on the right track in a previous method where you defined a
> data type. That is one way anyway...
>
> On Wed, 2003-09-17 at 22:46, gnawed wrote:
> > If I have a method that takes two strings, but only the first one
is
> > required:
> >
> > setName(lastname, firstname)
> >
> > How do I convey that in the WSDL file?  Do I need to create a new
> > type?  Or can I use minOccurs/maxOccurs in the <message><part>...
> >
> >
> >
> >
> >
> >                         Yahoo! Groups Sponsor
> >                                           ADVERTISEMENT
> >                                              click here
> >
> > 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.
> --
> Byrne Reese <byrne@m...>

#3014 From: "ctcard_hotmail_com" <chriscard1@...>
Date: Fri Sep 19, 2003 10:22 am
Subject: xml -> perl structure problem
ctcard_hotma...
Send Email Send Email
 
I have a SOAP::Lite client talking to a .NET server (this part is
working fine), but I have a problem with the way SOAP::Lite converts
the returned results into a native Perl structure.

I get back xml which has the following form:

<s>
  <e>
    <r>rval</r>
    <p>
     <x>xval0</x>
     <y>yval0</y>
    </p>
    <p>
     <x>...</x>
     <y>...</y>
    </p>
    .
    .
    .
    <p>
     <x>xvaln</x>
     <y>yvaln</y>
    </p>
  </e>
</s>

The problem is that the resulting Perl hash (in $result) looks like
$result->{s}{e}{r => rval}
$result->{s}{e}{p}{x => xvaln, y => xvaln}

How can I get SOAP::Lite to make something like
$result->{s}{e}{r => rval}
$result->{s}{e}{p}->[0]{x => xval0, y => yval0}
.
.
$result->{s}{e}{p}->[n]{x => xvaln, y => yvaln}
?

Chris

#3015 From: Gavin Hamill <gdh@...>
Date: Fri Sep 19, 2003 1:01 pm
Subject: Calling one method from another module
gdhgdh
Send Email Send Email
 
Hullo :)

I've developed some modules based on the tutorial at
http://www.perl.com/pub/a/2001/04/24/soap.html using their 'Ticket-based
authentication' as a base...

I'm now able to write clients which call the login() method and pass a
username/password pair, and get a session token back. My server-side methods
then use this fragment

sub methodName {
  my $self = shift; # First arg is name of module
  my $session = pop->valueof('//authInfo'); # last arg contains SOAP Header
  my $validity = $checkAuthInfo->($session);

  <main module code>
}

I include a checkAuthInfo inside each of the .pm files I despatch the incoming
SOAP requests to.

What I'd like to do, however, is call a method from another module whilst
inside an existing method. e.g. 'addNewSystemUser' would automatically call
'addMailbox', 'addFTPAccount' etc.

but I can't figure it out... if I simply add in a new section to 'methodName'
of

my $soap = SOAP::Lite -> uri('DHCP') -> proxy('http://127.0.0.1:81/');
my $authInfo = SOAP::Header->name(authInfo => $session);
my $result= $soap->getLeaseSettings($authInfo);
print $result->result;

and call that code, then the server just hangs :( If I put on SOAP::Lite
+trace qw(debug); I can see the output of the client request, but nothing
comes back from the server.  If I put some print statements into the server
getLeaseSettings method, I never see anything printed...

Calling the getLeaseSettings method is working fine from a simple standalone
'client.pl' ....

If anyone could suggest something, I'd be very grateful!

Cheers,
Gavin.

#3016 From: "edwardshallow" <ed.shallow@...>
Date: Fri Sep 19, 2003 3:52 pm
Subject: Re: HOWTO: literal serialization
edwardshallow
Send Email Send Email
 
Byrne and Paul,

     This is just one of the numerous posts on the need for better
document/literal handling in SOAP::Lite.

     Microsoft's latest products, Office2003, InfoPath, etc ... which
boast WebService invocation capabilities WILL NOT EVEN ACCEPT a WSDL
which is rpc-based IT MUST BE document/literal.

     This inter-op question is no longer simply an annoyance with
SOAP::Lite. It is (IMHO) becoming critical to SOAP::Lite's future.

     Please let us now how you will address this need in upcomning
releases (or if you have already ???), and kindly post some solid
recommendations for the interim while we wait.

A still happy and long-time SOAP::Lite user,
Ed




--- In soaplite@yahoogroups.com, Alberto Accomazzi <aaccomazzi@c...>
wrote:
> Jonathan,
>
> using your approach of creating elements via SOAP::Data calls I
still
> don't see a way to avoid having xsi data types within the XML when
> you're sending across hashes and arrays.  For instance, the
example
> client script I have posted under
http://ads.harvard.edu/~alberto/SOAP
> generates the following XML when I use the --literal option and
give it
> the command line arguments of "foo" "bar":
>
> <verify xmlns="http://ads.harvard.edu/DataVerifier">
>    <verifyRequest>
>      <header>
>        <protocolversion>0.3</protocolversion>
>      </header>
>      <identifiers>
>        <item>foo</item>
>        <item>bar</item>
>      </identifiers>
>    </verifyRequest>
> </verify>
>
> whereas if you don't use the --literal option (i.e. you use the
default
> serializer) you get this:
>
> <verify xmlns="http://ads.harvard.edu/DataVerifier">
>    <verifyRequest>
>      <header xsi:type="namesp1:SOAPStruct">
>        <protocolversion xsi:type="xsd:float">0.2</protocolversion>
>      </header>
>      <identifiers xsi:type="SOAP-ENC:Array"
> SOAP-ENC:arrayType="xsd:string[1]">
>        <item xsi:type="xsd:string">foo</item>
>        <item xsi:type="xsd:string">foo</item>
>      </identifiers>
>    </verifyRequest>
> </verify>
>
> I've played with maptype() and the like, but haven't found any
other way
> of removing the attributes for arrays and hashes.
>
> The reason for doing this, BTW, is to be able to write clients and
> servers that interoperate well with those SOAP toolkits that
insist in
> strict schema validation, rejecting an incoming query if it
contains the
>   type attributes.
>
> -- Alberto
>
>
> jpeyser wrote:
> > Alberto,
> >  There is a more straightforward way to insert your own
> > literals.  This is from the SOAP::Lite man page
> >
> >                print SOAP::Lite
> >                  -> new(....)
> >                  -> call(SOAP::Data->name('method')->attr({xmlns
> > => 'mynamespace'})
> >                          => @parameters)
> > 	         -> result;
> >
> > For example, when calling getQuote for a stock quote
> >
> > my $s = SOAP::Lite
> >   -> uri('urn:xmethods-delayed-quotes')
> >   -> proxy('http://services.xmethods.net/soap')
> > ;
> >
> > $r = $s->call(SOAP::Data->name('xyz:getQuote')
> > 		  ->attr({'xmlns:xyz' => 'urn:xmethods-delayed-
> > quotes'})
> >  => SOAP::Data->name('Symbol' => $symbol));
> >
> > Where necessary, the  data can be scoped using  ->prefix
(‘xyz’).
> > Your hack would be helpful with arrays.
> >
> > Don’t mean to discourage your hacking the code. I’ve done
some myself.
> >
> > Jonathan
> >
> >
> >
> > --- In soaplite@yahoogroups.com, Alberto Accomazzi
<aaccomazzi@c...>
> > wrote:
> >
> >>I just figured out a little hack that makes it possible to use
your
> >>existing SOAP::Lite code to create a message with literal
encoding
> >>(rather than the SOAP encoding that SOAP::Lite uses by
default).
> >
> > So I
> >
> >>thought I'd share the info with people on the mailing list and
see
> >
> > if
> >
> >>somebody has some suggestions on how this can be improved.
> >>
> >>Basically all you need to do is override the xmlize() and
envelope
> >
> > ()
> >
> >>methods so that all the attributes used for the SOAP encoding
are
> >>stripped and the default namespace is added to the method
element
> >
> > within
> >
> >>the body.
> >>
> >>What my hack does _not_ do is set the proper namespace to
reflect
> >
> > the
> >
> >>fact that we're using literal encoding (i.e. the SOAP envelope
> >
> > still has
> >
> >>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" in
it).
> >
> > Does
> >
> >>anybody know how to do this?
> >>
> >>The synopsis for the literal encoding is below.  Working
examples
> >
> > of
> >
> >>SOAP client and server scripts are available under the url
> >>http://ads.harvard.edu/~alberto/SOAP
> >>
> >>
> >>-- Alberto
> >>
> >>
> >>
> >>my $uri = 'urn:foo';
> >>my $service = SOAP::Lite
> >>     ->proxy('http://whatever.com/service.cgi')
> >>     ->serializer(LiteralSerializer->new)
> >>     ->uri($uri);
> >>#...
> >>
> >>BEGIN {
> >>     package LiteralSerializer;
> >>     @LiteralSerializer::ISA = 'SOAP::Serializer';
> >>     sub xmlize {
> >>         my $self = shift;
> >>         my($name, $attrs, $values, $id) = @{+shift};
> >>         $attrs ||= {};
> >>
> >>         # keep only namespace attributes for all elements
> >>         my $a = $attrs->{xmlns} ? {xmlns => $attrs->{xmlns}} :
{};
> >>
> >>         return $self->SUPER::xmlize([$name, $a, $values, $id]);
> >>     }
> >>     sub envelope {
> >>         $_[2] = (UNIVERSAL::isa($_[2] => 'SOAP::Data') ? $_[2] :
> >>                  SOAP::Data->name($_[2])->attr({xmlns => $uri}))
> >>             if $_[1] =~ /^(?:method|response)$/;
> >>         shift->SUPER::envelope(@_);
> >>     }
> >>}
> >>
> >>
> >>
> >>
> >
> >
*********************************************************************
*
> > ******
> >
> >>Alberto Accomazzi
> >>NASA Astrophysics Data System
> >
> > http://adswww.harvard.edu
> >
> >>Harvard-Smithsonian Center for Astrophysics      http://cfa-
> >
> > www.harvard.edu
> >
> >>60 Garden Street, MS 83, Cambridge, MA 02138 USA
> >>
> >
> >
*********************************************************************
*
> > ******
>
>
> --
>
>
*********************************************************************
*******
> Alberto Accomazzi
> NASA Astrophysics Data System
http://adswww.harvard.edu
> Harvard-Smithsonian Center for Astrophysics      http://cfa-
www.harvard.edu
> 60 Garden Street, MS 83, Cambridge, MA 02138 USA
>
*********************************************************************
*******

#3017 From: "B" <bjorn_svensson@...>
Date: Tue Sep 23, 2003 3:06 am
Subject: Creating client SOAP request with complex structure
bjorn_svensson
Send Email Send Email
 
How do I create the filterEnvelope in the below client SOAP request
(to a GLUE server):

<m:findPlace xmlns:m="PlaceFinder">
   <placeName xsi:type="xsd:string">Paris</placeName>
   <placeFinderOptions xsi:type="m0:PlaceFinderOptions">
    <dataSource xsi:type="xsd:string">ESRI.Gazetteer.World</dataSource>
    <filterEnvelope xsi:type="m1:Envelope">
      <minx xsi:type="xsd:double">-10.25</minx>
      <miny xsi:type="xsd:double">15.0</miny>
      <maxx xsi:type="xsd:double">50.10</maxx>
      <maxy xsi:type="xsd:double">60.0</maxy>
      <coordinateSystem xsi:type="m1:CoordinateSystem">
        <projection xsi:type="xsd:string">4326</projection>
      </coordinateSystem>
    </filterEnvelope>
   </placeFinderOptions>

Without filterEnvelope it works with this code:
   my $optionRef = {dataSource => "ESRI.Gazetteer.World"};
   my $return = SOAP::Lite
   -> service("http://arcweb.esri.com/services/v2/PlaceFinder.wsdl")
   -> findPlace("Paris", $optionRef, "$token");

But how do I add the filterEnvelope with minx etc?

Advice and/or suggestions greatly appreciated,
/hash-challenged

#3018 From: "gnawed" <gnawed@...>
Date: Tue Sep 23, 2003 3:49 am
Subject: How do I add a namespace to the deserializer?
gnawed
Send Email Send Email
 
If I have my own datatype like this:

<xsd:simpleType name="cars">
     <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Toyota"/>
         <xsd:enumeration value="Ford"/>
     </xsd:restriction>
</xsd:simpleType>

The client makes a call like:

$client->setCar(
     SOAP::Data->name(aCar => 'Toyota')->type(tns:cars)->attr
({'xmlns:cars' => 'urn:/My/NameSpace'})
);


How do I set up my SOAP::Server to deserialize this?

I tried this:

my $d = new SOAP::Deserializer();
$d->xmlschemas->{'urn:/My/NameSpace'} = 'My::Deserializer';
SOAP::Server->deserializer($d);


and the deserializer looks like:

package My::Deserializer;

sub as_cars {
     my $self = shift;
     my ($value, $name, $attr, $chil, $type) = @_;
     return $value;
}


This doesn't work.  I get a message like:

Application failed during request deserialization: Unrecognized
type '{urn:/My/NameSpace}cars'



I can get it to work if I change the client like this:

$client->setCar(
     SOAP::Data->name(aCar => 'Toyota')->type(tns:cars)->attr
({'xmlns:cars' => 'http://schemas.xmlsoap.org/soap/encoding/'})
);


and add a function to the server like:


package SOAP::XMLSchemaSOAP1_1::Deserializer;
sub SOAP::XMLSchemaSOAP1_1::Deserializer::as_cars {
     my $self = shift;
     my ($value, $name, $attr, $chil, $type) = @_;
     return $value;
}


What am I doing wrong?

#3019 From: "gnawed" <gnawed@...>
Date: Tue Sep 23, 2003 3:57 am
Subject: Re: How do I add a namespace to the deserializer?
gnawed
Send Email Send Email
 
Whoops, some typos.  See below:

--- In soaplite@yahoogroups.com, "gnawed" <gnawed@y...> wrote:
> If I have my own datatype like this:
>
> <xsd:simpleType name="cars">
>     <xsd:restriction base="xsd:string">
>         <xsd:enumeration value="Toyota"/>
>         <xsd:enumeration value="Ford"/>
>     </xsd:restriction>
> </xsd:simpleType>
>
> The client makes a call like:
>
> $client->setCar(
>     SOAP::Data->name(aCar => 'Toyota')->type(tns:cars)->attr
> ({'xmlns:cars' => 'urn:/My/NameSpace'})
> );
>

Should be:
$client->setCar(
     SOAP::Data->name(aCar => 'Toyota')->type('tns:cars')->attr
({'xmlns:tns' => 'urn:/My/NameSpace'})
);


>
> How do I set up my SOAP::Server to deserialize this?
>
> I tried this:
>
> my $d = new SOAP::Deserializer();
> $d->xmlschemas->{'urn:/My/NameSpace'} = 'My::Deserializer';
> SOAP::Server->deserializer($d);
>
>
> and the deserializer looks like:
>
> package My::Deserializer;
>
> sub as_cars {
>     my $self = shift;
>     my ($value, $name, $attr, $chil, $type) = @_;
>     return $value;
> }
>
>
> This doesn't work.  I get a message like:
>
> Application failed during request deserialization: Unrecognized
> type '{urn:/My/NameSpace}cars'
>
>
>
> I can get it to work if I change the client like this:
>
> $client->setCar(
>     SOAP::Data->name(aCar => 'Toyota')->type(tns:cars)->attr
> ({'xmlns:cars' => 'http://schemas.xmlsoap.org/soap/encoding/'})
> );
>
>
> and add a function to the server like:
>
>
> package SOAP::XMLSchemaSOAP1_1::Deserializer;
> sub SOAP::XMLSchemaSOAP1_1::Deserializer::as_cars {
>     my $self = shift;
>     my ($value, $name, $attr, $chil, $type) = @_;
>     return $value;
> }
>
>
> What am I doing wrong?

#3020 From: Stephane Bortzmeyer <bortzmeyer@...>
Date: Tue Sep 23, 2003 8:54 am
Subject: Interoperability problem: Unrecognized type '{http://www.w3.org/1999/XMLSchema}str
bortzmeyer@...
Send Email Send Email
 
[Sent to two mailing lists because it is an interoperability problem
and I'm not sure who the guilty is.]

I have a very simple SOAP application where the server is in Perl and
uses SOAP::Lite and the client is in Python and uses SOAPpy.

With Perl 5.6.1 / SOAP::Lite 0.55 and Python 2.1.3 / SOAPpy 0.9.7,
everything was fine.

Now, I upgraded (from Debian "stable" to Debian "unstable") and I use
the same versions of SOAP::Lite and SOAPpy. Perl is now 5.8.0 and
Python is 2.2.3. Each time the client runs, I get a <Fault
SOAP-ENV:Client: Application failed during request deserialization:
Unrecognized type '{http://www.w3.org/1999/XMLSchema}str'>.

Sniffing the session does not seem to show a difference so I'm
puzzled.

Here is the client, with SOAP.Config.debug=1:


*** Outgoing HTTP headers **********************************************
POST / HTTP/1.0
Host: vespucci:8080
User-agent: SOAP.py 0.9.7 (actzero.com)
Content-type: text/xml; charset="UTF-8"
Content-length: 515
SOAPAction: ""
************************************************************************
*** Outgoing SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:is_available xmlns:ns1="urn:Meticiel" SOAP-ENC:root="1">
<v1 xsi:type="xsd:str">nica.fr</v1>
</ns1:is_available>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming HTTP headers **********************************************
HTTP/1.? 500 Internal Server Error
Date: Tue, 23 Sep 2003 08:52:43 GMT
Server: libwww-perl-daemon/1.26
Content-Length: 718
Content-Type: text/xml; charset=utf-8
SOAPServer: SOAP::Lite/Perl/0.55
************************************************************************
*** Incoming SOAP ******************************************************
<?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:Bod\
y><SOAP-ENV:Fault><faultcode
xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultstring
xsi:type="xsd:string">Application failed during request deserialization:
Unrecognized type '{http://www.w3.org/1999/XMLSchema}str'
</faultstring><faultactor
xsi:type="xsd:string">http://vespucci.nic.fr:8080/</faultactor></SOAP-ENV:Fault>\
</SOAP-ENV:Body></SOAP-ENV:Envelope>
************************************************************************
Traceback (most recent call last):
   File "available-client-soap.py", line 20, in ?
     result = server.is_available(domain);
   File "/usr/lib/python2.2/site-packages/SOAP.py", line 3603, in __r_call
     self.__hd, self.__ma)
   File "/usr/lib/python2.2/site-packages/SOAP.py", line 3532, in __call
     raise p
SOAP.faultType: <Fault SOAP-ENV:Client: Application failed during request
deserialization: Unrecognized type '{http://www.w3.org/1999/XMLSchema}str'
>

#3021 From: "c_r_dawson" <cdawson@...>
Date: Wed Sep 24, 2003 9:15 am
Subject: possible to retrieve remote address when running as Daemon?
c_r_dawson
Send Email Send Email
 
Hi there,

I would like to know if it is possible to retrieve the remote
IP/address from the connecting client when servicing a SOAP request in
my module.  I had hoped that either the %ENV was set like a CGI, or
that perhaps I could use Apache::Request, but I am unfortunately
running as a Daemon, not withing Apache.  Is this possible?

My code is really simple:

my $daemon = SOAP::HTTP::Transport::Daemon
-> new( LocalPort => 80, LocalAddr => 192.168.1.10 )
-> objects_by_reference( qw( My::Module ) )
-> dispatch_to( 'My::Module::MethodA' )
$daemon->handle;

This is all working fine.

Would this be something to avoid when running a SOAP server?  I cannot
think of any reason why you would want to hide this.  The reason I
want to do it is to implement a kind of poor man's authentication.  I
have a web page coming over SSL which will serve up a java applet and
send a cryptographic key generated using the IP address and a secret
string.  The SOAP client will return this key back to the server and
the server can then verify whether they are properly authenticated by
verifying that their validated IP and the hidden key generate the
public key.  So, obviously I need to get a handle on the IP they come
from, not one which could be parameterized in the method call.

Thanks in advance.
Chris

#3022 From: "jpeyser" <jpeyser@...>
Date: Wed Sep 24, 2003 3:05 pm
Subject: Re: possible to retrieve remote address when running as Daemon?
jpeyser
Send Email Send Email
 
See message 2090.

--- In soaplite@yahoogroups.com, "c_r_dawson" <cdawson@w...> wrote:
> Hi there,
>
> I would like to know if it is possible to retrieve the remote
> IP/address from the connecting client when servicing a SOAP request
in
> my module.  I had hoped that either the %ENV was set like a CGI, or
> that perhaps I could use Apache::Request, but I am unfortunately
> running as a Daemon, not withing Apache.  Is this possible?
>
> My code is really simple:
>
> my $daemon = SOAP::HTTP::Transport::Daemon
> -> new( LocalPort => 80, LocalAddr => 192.168.1.10 )
> -> objects_by_reference( qw( My::Module ) )
> -> dispatch_to( 'My::Module::MethodA' )
> $daemon->handle;
>
> This is all working fine.
>
> Would this be something to avoid when running a SOAP server?  I
cannot
> think of any reason why you would want to hide this.  The reason I
> want to do it is to implement a kind of poor man's authentication.
I
> have a web page coming over SSL which will serve up a java applet
and
> send a cryptographic key generated using the IP address and a secret
> string.  The SOAP client will return this key back to the server and
> the server can then verify whether they are properly authenticated
by
> verifying that their validated IP and the hidden key generate the
> public key.  So, obviously I need to get a handle on the IP they
come
> from, not one which could be parameterized in the method call.
>
> Thanks in advance.
> Chris

#3023 From: Víctor A. Rodríguez - El bit Fantasma (Bit-Man) <victor@...>
Date: Wed Sep 24, 2003 9:57 pm
Subject: Compatibility
bitman09
Send Email Send Email
 
Hi all,

I'm working on some client/server SOAPing and just want to know what
to avoid, in SOAP terms, when speaking of clients and servers from
not-the-same-implementations (e.g. SOAP:Lite against SOAPpy, .NET,
etc.).

Mainly I want to minimize the portability related issues.

Hope to read from you all.
Best wishes.
--
Víctor A. Rodríguez (http://www.bit-man.com.ar)
El bit Fantasma (bit-man)

#3024 From: Stephane Bortzmeyer <bortzmeyer@...>
Date: Thu Sep 25, 2003 7:14 am
Subject: Re: Compatibility
bortzmeyer@...
Send Email Send Email
 
On Wed, Sep 24, 2003 at 09:57:56PM -0000,
  =?iso-8859-1?q?V=EDctor_A._Rodr=EDguez_-_El_bit_Fantasma_ (Bit-Man) ?=
<victor@...> wrote
  a message of 29 lines which said:

> I'm working on some client/server SOAPing and just want to know what
> to avoid, in SOAP terms, when speaking of clients and servers from
> not-the-same-implementations (e.g. SOAP:Lite against SOAPpy, .NET,
> etc.).

We are currently discussing SOAP vs. XML-RPC for an application and I
noticed that my message "Interoperability problem: Unrecognized type
'{http://www.w3.org/1999/XMLSchema}str" received exactly zero reply
from both mailing lists, which does not speak well for SOAP.

#3025 From: "Byrne Reese" <byrne@...>
Date: Thu Sep 25, 2003 2:16 pm
Subject: Re: Compatibility
byrnereese
Send Email Send Email
 
> We are currently discussing SOAP vs. XML-RPC for an application and I
> noticed that my message "Interoperability problem: Unrecognized type
> '{http://www.w3.org/1999/XMLSchema}str" received exactly zero reply
> from both mailing lists, which does not speak well for SOAP.

Well, it certainly doesn't speak well for those newsgroups... :-/

Let me answer the original question of this thread... what to avoid in
terms of compatibility:

* if this is a commercial application I would first understand the needs
of the customer as you often can't dictate how they will use your service.
If their use case requires large amounts of data to transacted, then you
may want to consider using attachments. But if they use .NET, then
SOAP::Lite and .NET won't play well together (.NET speaks DIME, SOAP::Lite
speak MIME).

* that being said, here is what I would avoid - document/literal style
encoding... toolkit support for this is coming, but is slow. for now stick
with SOAP RPC encoding. What's the difference? RPC style deals with
ArrayOf objects, doc-literal deals with sequences and choices and what
not... this is more a function of your WSDL, but something to be aware of

* avoid SOAP Encoding - especially in SOAP::Lite. it works great when
creating two SOAP::Lite services to talk to one another, but other than
that, it is more trouble than its worth. and I would say that about any
toolkit.

SOAP was designed to be interoperable to a certain extent... the issues
with it are usually idiosyncratic based on the toolkit you are using. But
most implementations are pretty baked at this point, and relatively
reliable.

XML-RPC is fine and dandy, but to be honest, SOAP is much more ubiquitous,
and support for SOAP over XML-RPC is IMHO really indisputable - especially
support for SOAP in commercial development platforms. That alone is reason
enough for me to recommend SOAP over XML-RPC. But there are many other
reasons to boot outlined in Programming Web Services in Perl...

^byrne :/

#3026 From: "Thom Eden" <the@...>
Date: Thu Sep 25, 2003 7:48 pm
Subject: server side handling of input
teden
Send Email Send Email
 
Folks,

I am building a couple of different web services. The first is a traffic cop and
the other 2 are point solutions.  I have defined the xsd input & output for the
point solutions and the traffic cop.

Clients subscribe to the traffic cop service. It in turn, based on rules,
decides whether to call one, both, or neither of the two point solutions,
capture any appropriate output, package it up and give it back to the client.

Now, it seems to me the traffic cop should have a really easy time of grabbing
the input data, deciding what goes where and so on. My input looks something
like

<A_Header>
   <ele1>...  (various arrays and hashes here)
</A_Header>
<B_Header>
   <ele2>...  (various arrays and hashes here)
</B_Header>

Now, I want to be able to grab $something which points to the entire <A_Header>
and $somtheing_else which points to the entire <B_Header> and pass each in their
respective calls to the other web services.

I've included @ISA=qw(SOAP::Server::Parameters), so I can
$som->match(SOAP::SOM::envelope) and so on...

What I am trying to avoid is diving into the entire structure of data coming in,
since we are looking at over 100 elements in each of the mentioned headers.

Any one have any pointers?

Thom Eden

#3027 From: Víctor A. Rodríguez <victor@...>
Date: Thu Sep 25, 2003 9:56 pm
Subject: Re: Compatibility
bitman09
Send Email Send Email
 
Byrne,

thanks for your help.

> * if this is a commercial application I would first understand the needs
> of the customer as you often can't dictate how they will use your service.

well, this is an open source initiative (TRex - http://trex.sf.net).
The main use of SOAP here is to permit the usage of software components
built using other languages than Perl. Then with some glue code, that
software component (just any piece of code that performs some defined
function) could be converted to a SOAP server, using TRex as a client.

That's why my question, because not only it needs to be language
independent BUT, but also have some SOAP implementation independence.

Thanks again for your help.
--
Víctor A. Rodríguez (http://www.bit-man.com.ar)
El bit Fantasma (bit-man)
Life hacker

#3028 From: "djnym2002" <anthonym@...>
Date: Fri Sep 26, 2003 8:57 pm
Subject: Namespaces in Header
djnym2002
Send Email Send Email
 
Hi,

I'm attempting to add a custom header in a client which implements the
WS-Security specification.  I've been following the example in
"Programming Web Services With Perl" pg 284 and am confused with
the output.

Basically I would like xml formed like that listed earlier on that
page, so something like

<s:Header>
   <wsse:Security>
     <wsse:UsernameToken>
        <wsse:Username>Foo</wsse:Username>
        <wsse:Password>Bar</wsse:Password>
     </wsse:UsernameToken>
   </wsse:Security>
</s:Header>

The example says to use something like

my $header = SOAP::Header->name(Security => {
   UsernameToken => {
     Username => SOAP::Data->type('' => 'Foo'),
     Password => SOAP::Data->type('' => 'Bar'),
   }
})->uri($wsse)->prefix('');

But that relies on a default namespace, so I changed the prefix value
to wsse, but that only seemed to effect the 'Security' tag, in other
words the outermost tag.  I've been trying various things to get the
xml to look correct but haven't quite hit on it yet.  Is this
something that I should use XML::Writer for, or does anyone know how
this is done in SOAP::Lite?  Also, does anyone know the reason that
setting the prefix at the outermost level doesn't work?

Thanks,

-Anthony

#3029 From: "malory_d" <malory_dc@...>
Date: Sat Sep 27, 2003 1:45 am
Subject: Add cookie to mod_soap server
malory_d
Send Email Send Email
 
Hi,

Could anyone please tell me how I could add a cookie to a soap message
on the server that would be sent back to a client.
Could you also plese tell me how I could retrieve this cookie from the
message sent by the server.

I am using a mod_perl Apache soap server.


Thanks
Malory.

Messages 3000 - 3029 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