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...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 6443 - 6473 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#6443 From: "Martin Busik" <martin.busik@...>
Date: Tue Mar 9, 2010 7:06 pm
Subject: AW: Got a Problem in building a WSDLcall in Perl SOAP::Lite from working PHP call...
mbusik70
Send Email Send Email
 
Hi,

> $paramneu = array('provider'=>$providerid,
> 			 'axles' => true,
> 			 'cabs' => true,
> 			 'carIds' => array('empty' =>
> false , 'array' => array(19016)),
> 			 'countriesCarSelection' => de,
> 			 'country'=>de,
> 			 'countryGroupFlag'=>false,
> 			 'countryUserSetting'=>de,
> 			 'motorCodes'=>true,
> 			 'secondaryTypes'=>true,
> 			 'vehicleDetails2'=>true,
> 			 'vehicleTerms'=>true,
> 			 'wheelbases'=>true,
> 			 'lang'=>de
> ); // set request
>
> $result = $client->call('getVehicleByIds2', array('in0' =>
> $paramneu));

> I know the problem is that carIds array.

Yepp. It is a good idea to find out, what xml-requests do php and perl
generate and then to find
out how to manage it to create what's needed.

I'm a fan of creating the request on my own, i.e. create an object-tree of
SOAP::Data-Instances.

I've used following before - with the PHP built in webservice api. I
suppose, nusoap.php uses the same (at least you get an idea):

$SOAPENC_PREFIX =
$proxy->serializer->find_prefix(SOAP::Constants::URI_SOAP11_ENC());
$XMLSOAP_PREFIX = $proxy->serializer->find_prefix($SOAP::Constants::NS_APS);
$client->call('Method',_array($e1,$e2,$e3,...))

sub _array {
     my ($name,@items) = @_;

     return SOAP::Data->name($name)->type($SOAPENC_PREFIX.":Array")->value(
          \SOAP::Data->value( (map { _item($_) } @items) )
     );
}

sub _item {
     my ($value) = @_;

     return _map("item",$value)      if ref($value) eq "HASH";
     return _array("item",@$value)   if ref($value) eq "ARRAY";
     return SOAP::Data->name("item")->value($value);
}

sub _map {
     my ($name,$hash) = @_;

     return SOAP::Data->name($name)->type($XMLSOAP_PREFIX.":Map")->value(
         \SOAP::Data->value(
         map {  SOAP::Data->name("item")->value( \SOAP::Data->value(
                 SOAP::Data->name("key")->value($_),
                 SOAP::Data->name("value")->value($hash->{$_})
                ))
         } keys %$hash
         )
     );
}

Array elements might be scalar values, arrays or hasharrays (maps), so it
should work with following php constructs:

$e1 = "scalar";
$e2 = array(1,2,"aaa")
$e3 = array("a" => 1, "b" => 2)

Cheers,
Martin

#6444 From: "rosko.james" <jamesrosko@...>
Date: Wed Mar 10, 2010 4:42 pm
Subject: SOAP::Lite defaults to SOAP 1.1 but uses XMLSchema1999
rosko.james
Send Email Send Email
 
An older version of SOAP::Lite (0.60) defaulted to SOAP 1.1 and XMLSchema 1999. 
However, SOAP::Lite 0.710 still defaults to SOAP 1.1 but use XMLSchema 2001.  I
think this is a bug in SOAP::Lite 0.710 where SOAP 1.1 defaults to XMLSchema
2001 instead of XMLSchema 1999.  This behavior can be overridden by setting:

$client->xmlschema('http://www.w3.org/1999/XMLSchema');

Details:
from soap::lite 0.60
%SOAP_VERSIONS = (
($SOAP_VERSION = 1.1) => {
   NEXT_ACTOR => 'http://schemas.xmlsoap.org/soap/actor/next',
   NS_ENV => 'http://schemas.xmlsoap.org/soap/envelope/',
   NS_ENC => 'http://schemas.xmlsoap.org/soap/encoding/',
   DEFAULT_XML_SCHEMA => 'http://www.w3.org/1999/XMLSchema',
},
1.2 => {
   NEXT_ACTOR => 'http://www.w3.org/2001/06/soap-envelope/actor/next',
   NS_ENV => 'http://www.w3.org/2001/06/soap-envelope',
   NS_ENC => 'http://www.w3.org/2001/06/soap-encoding',
   DEFAULT_XML_SCHEMA => 'http://www.w3.org/2001/XMLSchema',
   },
);

from SOAP::Lite 0.710 (SOAP::Constants), notice how both use XMLSchema 2001,
$SOAP_VERSION = '1.1';
%SOAP_VERSIONS = (
     1.1 => {
         NEXT_ACTOR                => URI_SOAP11_NEXT_ACTOR,
         NS_ENV                    => URI_SOAP11_ENV,
         NS_ENC                    => URI_SOAP11_ENC,
         DEFAULT_XML_SCHEMA        => URI_2001_SCHEMA_XSD,
         DEFAULT_HTTP_CONTENT_TYPE => 'text/xml',
     },
     1.2 => {
         NEXT_ACTOR                => URI_SOAP12_NEXT_ACTOR,
         NS_ENV                    => URI_SOAP12_ENV,
         NS_ENC                    => URI_SOAP12_ENC,
         DEFAULT_XML_SCHEMA        => URI_2001_SCHEMA_XSD,
         DEFAULT_HTTP_CONTENT_TYPE => 'application/soap',
     },
);

#6445 From: "dbower01" <dbower01@...>
Date: Wed Mar 17, 2010 3:32 pm
Subject: Empty Result Returned in SOAP::Lite but not soapUI GUI using same request
dbower01
Send Email Send Email
 
Dear Group,

I've been encountering an issue with a particular result being returned empty
from a webservice through SOAP::Lite but using the same exact request that is
being sent from SOAP::Lite (copy and pasted from the +trace ouput) in the free
soapUI client I actually receive the expected result. I am successfully using
other methods of this webservice without any issues.

Any insight into why this is occurring would be greatly appreciated. I've
already started digging into the source code but thought I would post this and
see if any responds...

I believe I've included enough information below regarding the wsdl, the request
and the different responses from both SOAP::Lite and soapUI.

Sincerely,
Dave

---------- WSDL SNIPPET ----------

<!--
Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI
2.1.7-b01-.
-->
<!--
Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI
2.1.7-b01-.
-->
<definitions targetNamespace="http://zzz.com"
name="StructureSearchToolkitService">
   <types>
     <xsd:schema>
       <xsd:import namespace="http://zzz.com"
schemaLocation="http://bigbird:8086/services/StructureSearchToolkit?xsd=1"/>
     </xsd:schema>
   </types>

   <message name="getLastSearchResult">
     <part name="parameters" element="tns:getLastSearchResult"/>
   </message>
   <message name="getLastSearchResultResponse">
     <part name="parameters" element="tns:getLastSearchResultResponse"/>
   </message>

   <portType name="StructureSearchToolkit">
     <operation name="getLastSearchResult">
       <input message="tns:getLastSearchResult"/>
       <output message="tns:getLastSearchResultResponse"/>
     </operation>
   </portType>

   <binding name="StructureSearchToolkitPortBinding"
type="tns:StructureSearchToolkit">
     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
     <operation name="getLastSearchResult">
       <soap:operation soapAction="urn:GetLastSearchResult"/>
         <input>
           <soap:body use="literal"/>
         </input>
         <output>
           <soap:body use="literal"/>
         </output>
     </operation>
   </binding>

   <service name="StructureSearchToolkitService">
     <port name="StructureSearchToolkitPort"
binding="tns:StructureSearchToolkitPortBinding">
       <soap:address
location="http://bigbird:8086/services/StructureSearchToolkit"/>
     </port>
   </service>
</definitions>

---------- The request object generated by SOAP::Lite ----------
<soap:Envelope
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:my="http://zzz.com">
   <soap:Header>
     <my:lseSessionId>126</my:lseSessionId>
   </soap:Header>
   <soap:Body>
     <my:getLastSearchResult xsi:nil="true" />
   </soap:Body>
</soap:Envelope>

---------- The response received by SOAP::Lite ----------
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
     <ns2:getLastSearchResultResponse xmlns:ns2="http://zzz.com"/>
   </S:Body>
</S:Envelope>

---------- The response received by soapUI ----------
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
       <ns2:getLastSearchResultResponse xmlns:ns2="http://zzz.com">
          <structureSearchResultElements>
             <similarityScore>0.0</similarityScore>
             <structureId>31979</structureId>
             <structureName>LS-11</structureName>
          </structureSearchResultElements>
          <structureSearchResultElements>
             <similarityScore>0.0</similarityScore>
             <structureId>118732</structureId>
             <structureName>LS-64</structureName>
          </structureSearchResultElements>
       </ns2:getLastSearchResultResponse>
    </S:Body>
</S:Envelope>

#6446 From: "Martin Busik" <martin.busik@...>
Date: Wed Mar 17, 2010 4:16 pm
Subject: AW: Empty Result Returned in SOAP::Lite but not soapUI GUI using same request
mbusik70
Send Email Send Email
 
Hi,
I suppose, there goes something wrong with your lseSessionId.

Have you started a query in your perl code? do you use the same
lseSessionID in both requests?

Cheers,
Martin

> ---------- The request object generated by SOAP::Lite ----------
> <soap:Envelope
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:my="http://zzz.com">
>   <soap:Header>
>     <my:lseSessionId>126</my:lseSessionId>
>   </soap:Header>
>   <soap:Body>
>     <my:getLastSearchResult xsi:nil="true" />
>   </soap:Body>
> </soap:Envelope>

#6447 From: "dbower01" <dbower01@...>
Date: Wed Mar 17, 2010 7:15 pm
Subject: Re: Empty Result Returned in SOAP::Lite but not soapUI GUI using same request
dbower01
Send Email Send Email
 
Hi Martin,

Thanks for the reply, I'm certain that the lseSessionID portion is definitely
working correctly because there are several steps prior to the final one listed
here that all work correctly with the lseSessionID. The same lseSessionID is
persisted through all webservice requests until it is explicitly released by the
client.

Something of interest though is that I trapped some of the http header
information and SOAP::Lite is sending this:

POST /services/StructureSearchToolkit HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Host: bigbird:8086
User-Agent: SOAP::Lite/Perl/0.710.10
Content-Length: 607
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://zzz.com#getLastSearchResult"

Whereas soapUI is sending this:

POST /services/StructureSearchToolkit HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:GetLastSearchResult"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bigbird:8086
Content-Length: 555

When I check the Response Headers in soapUI I see:

Transfer-Encoding: chunked
Content-Type: text/xml; charset=utf-8
Server: Jetty(6.1.6)
status: HTTP/1.1 200 OK

Cheers,
Dave

--- In soaplite@yahoogroups.com, "Martin Busik" <martin.busik@...> wrote:
>
> Hi,
> I suppose, there goes something wrong with your lseSessionId.
>
> Have you started a query in your perl code? do you use the same
> lseSessionID in both requests?
>
> Cheers,
> Martin
>
> > ---------- The request object generated by SOAP::Lite ----------
> > <soap:Envelope
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> >     xmlns:my="http://zzz.com">
> >   <soap:Header>
> >     <my:lseSessionId>126</my:lseSessionId>
> >   </soap:Header>
> >   <soap:Body>
> >     <my:getLastSearchResult xsi:nil="true" />
> >   </soap:Body>
> > </soap:Envelope>
>

#6448 From: "chfoerst@..." <chfoerst@...>
Date: Wed Mar 17, 2010 9:01 pm
Subject: How to manipulate SOAP::Lite Server answer to special format ?
chfoerst...
Send Email Send Email
 
Dear group,
I asked the same to the perlmonks, but maybe here are more Soaplite specialists
:-)

So here we go :

I got a question about SOAP::Lite, which I can't fiddle out:

my $daemon = SOAP::Transport::HTTP::Daemon
              -> new (LocalPort => 8088, Reuse => 1)
              -> on_action(sub {})
              -> dispatch_to('ServiceError');
print "Contact to SOAP server at ", $daemon->url, "\n";
$daemon->handle;

sub ServiceError {
  print "ServiceError\n";
  return SOAP::Data->name('ResponseType')->value('ACKNOWLEDGE');
}


This returns the following SOAP-XML to the client:

<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:so
+apenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/ +envelope/">
<soap:Body>
  <ServiceErrorResponse xmlns="http://DataModel_v4.xxxxxxxxx.com">
    <ResponseType xsi:type="xsd:string">ACKNOWLEDGE</ResponseType>
  </ServiceErrorResponse>
</soap:Body>
</soap:Envelope>

but this one I need to send to the client :

<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:so
+apenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/ +envelope/">
<soapenv:Body>
  <ResponseType>ACKNOWLEDGE</ResponseType>
</soapenv:Body>
</soapenv:Envelope>

Is there a way to tell SOAP::Lite to suppress the  <ServiceErrorResponse> Tags
around my single-line message?

Thanks for any hints !

Cheers,
Christian

#6449 From: "Martin Busik" <martin.busik@...>
Date: Thu Mar 18, 2010 5:15 pm
Subject: AW: Re: Empty Result Returned in SOAP::Lite but not soapUI GUI using same request
mbusik70
Send Email Send Email
 
Hi,

> http header information and SOAP::Lite is sending this:
>
> SOAPAction: "http://zzz.com#getLastSearchResult"
>
> Whereas soapUI is sending this:
>
> SOAPAction: "urn:GetLastSearchResult"

SOAPAction might be the cause.

Try this:

$proxy->on_action( "urn:".$_[1] } );

(see the on_action documentation)

Cheers,
Martin

#6450 From: "dbower01" <dbower01@...>
Date: Thu Mar 18, 2010 9:46 pm
Subject: Re: Empty Result Returned in SOAP::Lite but not soapUI GUI using same request
dbower01
Send Email Send Email
 
Martin,

Still no luck. I'm going to start further nitty-gritty checking by writing a
very simple webservice just using perl that will return the same type of data
object. Based on the snippet I read in SOAP::WSDL regarding JAX inconsistencies.
The baffling part is that I actually get a response from the webservice - it
just contains no data...

Dave

--- In soaplite@yahoogroups.com, "Martin Busik" <martin.busik@...> wrote:
>
> Hi,
>
> > http header information and SOAP::Lite is sending this:
> >
> > SOAPAction: "http://zzz.com#getLastSearchResult"
> >
> > Whereas soapUI is sending this:
> >
> > SOAPAction: "urn:GetLastSearchResult"
>
> SOAPAction might be the cause.
>
> Try this:
>
> $proxy->on_action( "urn:".$_[1] } );
>
> (see the on_action documentation)
>
> Cheers,
> Martin
>

#6451 From: Martin Kutter <martin.kutter@...>
Date: Thu Mar 18, 2010 8:59 pm
Subject: Re: How to manipulate SOAP::Lite Server answer to special format ?
kutterma
Send Email Send Email
 
Hi,

> but this one I need to send to the client :
>
> <soap:Envelope
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:so
> +apenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/ +envelope/">
> <soapenv:Body>
> <ResponseType>ACKNOWLEDGE</ResponseType>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Is there a way to tell SOAP::Lite to suppress the
> <ServiceErrorResponse> Tags around my single-line message?

you have to tweak the SOAP server to use a freeform response - to do so,
subclass the server class you're using and override the handle method.
SOAP::Server always returns a "response" type message.

For generating the content itself, see the SOAP::Serializer manpage and
look for "freeform".

Martin

#6453 From: "smsless" <smsless@...>
Date: Fri Mar 19, 2010 4:42 pm
Subject: using data structures in PERL SOAP::Lite calling sequence
smsless
Send Email Send Email
 
I am new to SOAP::Lite within PERL and need this to access a data repository.
However, access to this repository is using a function call
(findGtypeByGroupList) that takes a data structure as an argument.

Below is the Java expansion of the function call. What I need is how to set this
function call up using PERL SOAP::Lite.

<soapenv: Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:gtype="urn:webservice.os/abcService"
xmlns:java="java:os.webservice.criteria">
   <soapenv:Header/>
   <soapenv:Body>
       <gtype:findGtypeByGroupList>
         <gtype:GtypeListCriteria>
           <java:Gtype>
             <java:Mtype>123</java:Mtype>
             <java:AsOf>03-16-2010</java:AsOf>
           </java:Gtype>
           <java:Page>
             <java:Start>0</java:Start>
             <java:Limit>10000</java:Limit>
           </java:Page>
           <java:Audit>
             <java:SysFrom>PV_Sys</java:SysFrom>
           </java:Audit>
         </gtype:GtypeListCriteria>
       </gtype:findGtypeByGroupList>
   </soapenv:Body>
</soapenv:Envelope>

#6454 From: "miage_2003" <miage_2003@...>
Date: Wed Mar 24, 2010 8:58 am
Subject: call soap services with SOAP::LITE ? problem with complexType
miage_2003
Send Email Send Email
 

I try to use a webServices with SOAP::LITE. With only simpleType like String is OK. But if I work with complexType my object in the service is always NULL.

I'm new in perl development and I need help please.

How call my type that name is "PARAMETERS" ?

Thanks for your help.

-------------- My SOAP:LITE client --------- (problem)

#!perl

use strict;

use SOAP::Lite;

my $client = SOAP::Lite
 ->proxy('http://172.31.179.213:8080/PrototypeCXF_2/UsService?wsdl');

my $result = $client->callOperation3(SOAP::Data->name('USER' => \SOAP::Data->value(
            SOAP::Data->name('USER' => 'user')
            ,SOAP::Data->name('PASSWORD' => 'password')
            ))
         ,SOAP::Data->name('EQUIPMENTPARAMSREQUEST' => \SOAP::Data->value(
            SOAP::Data->name('TYPE' => 'type')
            ,SOAP::Data->name('NAME' => 'name')
            ,SOAP::Data->name('ADDRESS' => 'address')
            ,SOAP::Data->name('VENDOR_MODEL' => 'vendor_model')
            ,SOAP::Data->name('PARALLEL_EXEC' => 'parallel_exec')
            ,SOAP::Data->name('PARAMETERS' => [{'key' => 'clef', 'value' => 'valeur'}])->type('complexType')
            ,SOAP::Data->name('OPERATIONAL_STATE' => 'operational_state')
            ))   
         );          

unless ($result->fault) {

 print $result->result();

} else {

 print join ', ',
  $result->faultcode,
  $result->faultstring,
  $result->faultdetail;
}

------------- My WSDL ---------(problem)

  <?xml version="1.0" ?>
- <wsdl:definitions name="ContactUsServiceImplService" targetNamespace="http://prototypeCXF.test.foo.com/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://prototypeCXF.test.foo.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://prototypeCXF.test.foo.com/" xmlns:tns="http://prototypeCXF.test.foo.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:complexType name="userRequest">
- <xs:sequence>
  <xs:element minOccurs="0" name="PASSWORD" type="xs:string" />
  <xs:element minOccurs="0" name="USER" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="equipmentParamsRequest">
- <xs:sequence>
  <xs:element minOccurs="0" name="ADDRESS" type="xs:string" />
  <xs:element minOccurs="0" name="NAME" type="xs:string" />
  <xs:element minOccurs="0" name="OPERATIONAL_STATE" type="xs:int" />
  <xs:element minOccurs="0" name="PARALLEL_EXEC" type="xs:int" />
- <xs:element name="PARAMETERS">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
- <xs:complexType>
- <xs:sequence>
  <xs:element minOccurs="0" name="key" type="xs:anyType" />
  <xs:element minOccurs="0" name="value" type="xs:anyType" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element minOccurs="0" name="TYPE" type="xs:string" />
  <xs:element minOccurs="0" name="VENDOR_MODEL" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="hashMap">
- <xs:complexContent>
- <xs:extension base="tns:abstractMap">
  <xs:sequence />
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>
- <xs:complexType abstract="true" name="abstractMap">
  <xs:sequence />
  </xs:complexType>
  <xs:element name="callOperation3" type="tns:callOperation3" />
- <xs:complexType name="callOperation3">
- <xs:sequence>
  <xs:element minOccurs="0" name="USER" type="tns:userRequest" />
  <xs:element minOccurs="0" name="EQUIPMENTPARAMS" type="tns:equipmentParamsRequest" />
  </xs:sequence>
  </xs:complexType>
  <xs:element name="callOperation3Response" type="tns:callOperation3Response" />
- <xs:complexType name="callOperation3Response">
  <xs:sequence />
  </xs:complexType>
  </xs:schema>
  </wsdl:types>
- <wsdl:message name="callOperation3Response">
  <wsdl:part element="tns:callOperation3Response" name="parameters" />
  </wsdl:message>
- <wsdl:message name="callOperation3">
  <wsdl:part element="tns:callOperation3" name="parameters" />
  </wsdl:message>
- <wsdl:portType name="ContactUsService">
- <wsdl:operation name="callOperation3">
  <wsdl:input message="tns:callOperation3" name="callOperation3" />
  <wsdl:output message="tns:callOperation3Response" name="callOperation3Response" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="ContactUsServiceImplServiceSoapBinding" type="tns:ContactUsService">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="callOperation3">
  <soap:operation soapAction="" style="document" />
- <wsdl:input name="callOperation3">
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output name="callOperation3Response">
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="ContactUsServiceImplService">
- <wsdl:port binding="tns:ContactUsServiceImplServiceSoapBinding" name="ContactUsServiceImplPort">
  <soap:address location="http://localhost:8080/PrototypeCXF_2/UsService" />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

#6455 From: Jo Rhett <jrhett@...>
Date: Thu Mar 25, 2010 5:59 pm
Subject: documentation flaw for setting trace options
jorhett
Send Email Send Email
 
The documentation (pod) for trace options indicates that the follow is possible:

# Send output to a function
SOAP::Lite->import(
         +trace => method => transport => \&doDebug
);

# Send all output except for method and transport
SOAP::Lite->import(
         +trace => all => -transport => -method
);

Both of these seem to work as documented.  However, if you combine both together
you get failures.
SOAP::Lite->import(
         +trace => all => -transport => -method => -objects => \&doDebug
);

Can't locate class method "-transport" via package "SOAP::Lite\" at line 36
Compilation failed in require at ./tester.pl line 5.

Both of these seem to work as documented.  However, if you combine both together
you get failures.
SOAP::Lite->import(
         +trace => all => \&doDebug
	 => -transport => -method => -objects
);

Can't locate class method "-method" via package "SOAP::Lite\" at line 36
Compilation failed in require at ./tester.pl line 5.

Is this a documentation bug, or ...?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness

#6456 From: Jo Rhett <jrhett@...>
Date: Thu Mar 25, 2010 6:13 pm
Subject: Re: call soap services with SOAP::LITE ? problem with complexType
jorhett
Send Email Send Email
 
Does the object being returned know how to represent itself to print?   I suspect not.

I would try doing this and looking at the result, then figuring out what commands to output it:

 print $result->result();

use Data::Dumper;
print Data::Dumper->Dump( $result->result() );

This will show you the object types being returned.  Then write a routine to output the appropriate form.

On Mar 24, 2010, at 1:58 AM, miage_2003 wrote:

I try to use a webServices with SOAP::LITE. With only simpleType like String is OK. But if I work with complexType my object in the service is always NULL.

I'm new in perl development and I need help please.

How call my type that name is "PARAMETERS" ?

Thanks for your help.

-------------- My SOAP:LITE client --------- (problem)

#!perl

use strict;

use SOAP::Lite;

my $client = SOAP::Lite
 ->proxy('http://172.31.179.213:8080/PrototypeCXF_2/UsService?wsdl');

my $result = $client->callOperation3(SOAP::Data->name('USER' => \SOAP::Data->value(
            SOAP::Data->name('USER' => 'user')
            ,SOAP::Data->name('PASSWORD' => 'password')
            ))
         ,SOAP::Data->name('EQUIPMENTPARAMSREQUEST' => \SOAP::Data->value(
            SOAP::Data->name('TYPE' => 'type')
            ,SOAP::Data->name('NAME' => 'name')
            ,SOAP::Data->name('ADDRESS' => 'address')
            ,SOAP::Data->name('VENDOR_MODEL' => 'vendor_model')
            ,SOAP::Data->name('PARALLEL_EXEC' => 'parallel_exec')
            ,SOAP::Data->name('PARAMETERS' => [{'key' => 'clef', 'value' => 'valeur'}])->type('complexType')
            ,SOAP::Data->name('OPERATIONAL_STATE' => 'operational_state')
            ))   
         );          

unless ($result->fault) {

 print $result->result();

} else {

 print join ', ',
  $result->faultcode,
  $result->faultstring,
  $result->faultdetail;
}

------------- My WSDL ---------(problem)

  <?xml version="1.0" ?>
- <wsdl:definitions name="ContactUsServiceImplService" targetNamespace="http://prototypeCXF.test.foo.com/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://prototypeCXF.test.foo.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://prototypeCXF.test.foo.com/" xmlns:tns="http://prototypeCXF.test.foo.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:complexType name="userRequest">
- <xs:sequence>
  <xs:element minOccurs="0" name="PASSWORD" type="xs:string" />
  <xs:element minOccurs="0" name="USER" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="equipmentParamsRequest">
- <xs:sequence>
  <xs:element minOccurs="0" name="ADDRESS" type="xs:string" />
  <xs:element minOccurs="0" name="NAME" type="xs:string" />
  <xs:element minOccurs="0" name="OPERATIONAL_STATE" type="xs:int" />
  <xs:element minOccurs="0" name="PARALLEL_EXEC" type="xs:int" />
- <xs:element name="PARAMETERS">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
- <xs:complexType>
- <xs:sequence>
  <xs:element minOccurs="0" name="key" type="xs:anyType" />
  <xs:element minOccurs="0" name="value" type="xs:anyType" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element minOccurs="0" name="TYPE" type="xs:string" />
  <xs:element minOccurs="0" name="VENDOR_MODEL" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="hashMap">
- <xs:complexContent>
- <xs:extension base="tns:abstractMap">
  <xs:sequence />
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>
- <xs:complexType abstract="true" name="abstractMap">
  <xs:sequence />
  </xs:complexType>
  <xs:element name="callOperation3" type="tns:callOperation3" />
- <xs:complexType name="callOperation3">
- <xs:sequence>
  <xs:element minOccurs="0" name="USER" type="tns:userRequest" />
  <xs:element minOccurs="0" name="EQUIPMENTPARAMS" type="tns:equipmentParamsRequest" />
  </xs:sequence>
  </xs:complexType>
  <xs:element name="callOperation3Response" type="tns:callOperation3Response" />
- <xs:complexType name="callOperation3Response">
  <xs:sequence />
  </xs:complexType>
  </xs:schema>
  </wsdl:types>
- <wsdl:message name="callOperation3Response">
  <wsdl:part element="tns:callOperation3Response" name="parameters" />
  </wsdl:message>
- <wsdl:message name="callOperation3">
  <wsdl:part element="tns:callOperation3" name="parameters" />
  </wsdl:message>
- <wsdl:portType name="ContactUsService">
- <wsdl:operation name="callOperation3">
  <wsdl:input message="tns:callOperation3" name="callOperation3" />
  <wsdl:output message="tns:callOperation3Response" name="callOperation3Response" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="ContactUsServiceImplServiceSoapBinding" type="tns:ContactUsService">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="callOperation3">
  <soap:operation soapAction="" style="document" />
- <wsdl:input name="callOperation3">
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output name="callOperation3Response">
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="ContactUsServiceImplService">
- <wsdl:port binding="tns:ContactUsServiceImplServiceSoapBinding" name="ContactUsServiceImplPort">
  <soap:address location="http://localhost:8080/PrototypeCXF_2/UsService" />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>


-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other randomness


#6457 From: Jo Rhett <jrhett@...>
Date: Thu Mar 25, 2010 6:16 pm
Subject: Fault inside Envelope instead of Body?
jorhett
Send Email Send Email
 
I'm dealing with a SOAP API that is returning Faults inside the envelope instead
of inside the body.   This is clearly against the API documentation, but they
are unlikely to fix it any time soon.

I'm catching this with " if( $som->envelope->{'Fault'} ) ..." but I'm wondering
if there is some way to alter the result to add the body tags around the fault
and thus tickle the built in fault handlers?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness

#6458 From: Jo Rhett <jrhett@...>
Date: Thu Mar 25, 2010 11:51 pm
Subject: with ->call() => $value is different from ->value( $value ) ?
jorhett
Send Email Send Email
 
Very simple question.   Where SOAPAUTH is a Header object,  this works:

my $som = $soap->call(
         SOAP::Data->name( $method )->attr( $SAMAPI ) =>  $SOAPAUTH
);

this does not:

my $som = $soap->call(
         SOAP::Data->name( $method )->attr( $SAMAPI )->value( $SOAPAUTH )
);

Why not?  What is the difference with the passed in value?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness

#6459 From: Jo Rhett <jrhett@...>
Date: Thu Mar 25, 2010 11:56 pm
Subject: call multiple methods in a single call?
jorhett
Send Email Send Email
 
I've got singular method calls working fine:

   my $som = $soap->call( SOAP::Data->name( 'ping' )->attr( $API ) => $AUTH );

or simpler if I didn't need the attribute:
   my $som = $soap->call( 'ping', $AUTH );

They generate
<SOAP:Header>
   (authentication headers)
</SOAP:Header>
<SOAP:Body>
   <ping xmlns="$apiver">
</SOAP:Body>

Here's the problem.  The API I'm dealing with wants me to supply multiple
methods in the same call.
<SOAP:Body>
   <timeStamp xmlns="$apiver" />
   <ping xmlns="$apiver" />
   <timeStamp xmlns="$apiver" />
</SOAP:Body>

I can't figure out how to do this.   Adding more data objects to the ->call()
produces this instead:
<SOAP:Body>
   <ping xmlns="$apiver">
     <timeStamp xmlns="$apiver">
     <timeStamp xmlns="$apiver">
   </ping>
</SOAP:Body>

I need to supply more methods without encapsulating them in a single method.  
How can I do this with SOAP::Lite?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness

#6460 From: Jo Rhett <jrhett@...>
Date: Fri Mar 26, 2010 5:48 pm
Subject: disable c-gensym elements? Docs on soaplite are 404
jorhett
Send Email Send Email
 
There is a page with two links on it about how to disable the c-gensym elements

http://www.soaplite.com/2003/08/how_do_you_turn.html

Both of the links there are dead, missing page.   Can we update this page
please?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness

#6461 From: "Martin Busik" <martin.busik@...>
Date: Sat Mar 27, 2010 9:04 pm
Subject: AW: with ->call() => $value is different from ->value( $value ) ?
mbusik70
Send Email Send Email
 
Hi,

> Very simple question.   Where SOAPAUTH is a Header object,
> this works:
>
> my $som = $soap->call(
>         SOAP::Data->name( $method )->attr( $SAMAPI ) =>  $SOAPAUTH
> );
>
> this does not:
>
> my $som = $soap->call(
>         SOAP::Data->name( $method )->attr( $SAMAPI )->value(
> $SOAPAUTH )
> );
>
> Why not?  What is the difference with the passed in value?

the construct:

SOAP::Data->name( $method )->attr( $SAMAPI ) =>  $SOAPAUTH

is just a syntactical variant to:

SOAP::Data->name( $method )->attr( $SAMAPI ), $SOAPAUTH


Then SOAP::Lite recognizes SOAPAUTH as a Header object and serializes
it in the SOAP:Header.  The construct

SOAP::Data->name( $method )->attr( $SAMAPI )->value( $SOAPAUTH

instructs SOAP::Lite to put SOAPAUTH inside (->value) of the $method tag.

HTH,
Martin

#6462 From: "Martin Busik" <martin.busik@...>
Date: Sat Mar 27, 2010 9:05 pm
Subject: AW: Fault inside Envelope instead of Body?
mbusik70
Send Email Send Email
 
Hi,

> I'm catching this with " if( $som->envelope->{'Fault'} ) ..."
> but I'm wondering if there is some way to alter the result to
> add the body tags around the fault and thus tickle the built
> in fault handlers?

You might use the trace handler to rewrite the response, but I suppose, your
solution
is the better one.

Cheers,
Martin

#6463 From: "Martin Busik" <martin.busik@...>
Date: Sat Mar 27, 2010 9:09 pm
Subject: AW: call soap services with SOAP::LITE ? problem with complexType
mbusik70
Send Email Send Email
 
Hi,

> I try to use a webServices with SOAP::LITE. With only
> simpleType like String is OK. But if I work with complexType
> my object in the service is always NULL.

You mean the request does not contain your parameter?

Try:

$client->call('callOperation3',SOAP::Data->name('USER' ...

Cheers,
Martin

#6464 From: "Martin Busik" <martin.busik@...>
Date: Sat Mar 27, 2010 9:27 pm
Subject: AW: using data structures in PERL SOAP::Lite calling sequence
mbusik70
Send Email Send Email
 
Hi,

> I am new to SOAP::Lite within PERL and need this to access a
> data repository. However, access to this repository is using
> a function call (findGtypeByGroupList) that takes a data
> structure as an argument.
>
>   <soapenv:Body>
>       <gtype:findGtypeByGroupList>
>         <gtype:GtypeListCriteria>
>           <java:Gtype>
>             <java:Mtype>123</java:Mtype>
>             <java:AsOf>03-16-2010</java:AsOf>
>           </java:Gtype>
>           <java:Page>
>             <java:Start>0</java:Start>
>             <java:Limit>10000</java:Limit>
>           </java:Page>
>           <java:Audit>
>             <java:SysFrom>PV_Sys</java:SysFrom>
>           </java:Audit>
>         </gtype:GtypeListCriteria>
>       </gtype:findGtypeByGroupList>
>   </soapenv:Body>
> </soapenv:Envelope>

You need to look for "complexType", one possible way is:

$proxy->call("qtype:findGtypeByGroupList",
    SOAP::Data->name("qtype:GtypeListCriteria")->value( \SOAP::Data->value(
	 SOAP::Data->name("java:Gtype")->value( \SOAP::Data-value(
		 SOAP::Data->name("java:Mtype")->value(123),
		 SOAP::Data->name("java:AsOf")->value(03-16-2010)
	 )
    )
...

HTH,
Martin

#6465 From: Joseph Werner <telcodev@...>
Date: Sun Mar 28, 2010 1:35 am
Subject: Re: disable c-gensym elements? Docs on soaplite are 404
telcodev@...
Send Email Send Email
 
Seeing as no-one else is answering...

I don't know about the link, but...

I did this by hacking the serializer.  Inherit a class from the serializer and overload the xmlize function to call the base class xmlize and then s{c-gensym}{}xmsg

I'm sure there are cleaner ways, but hey, this worked for me...

Saltbreez

On Fri, Mar 26, 2010 at 10:48 AM, Jo Rhett <jrhett@...> wrote:
 

There is a page with two links on it about how to disable the c-gensym elements

http://www.soaplite.com/2003/08/how_do_you_turn.html

Both of the links there are dead, missing page. Can we update this page please?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other randomness




--
I require any third parties to obtain my permission to submit my information to any other party for each such submission. I further require any third party to follow up on any submittal of my information by sending detailed information regarding each such submission to telcodev@...
Joseph Werner

#6466 From: Dave Howorth <dhoworth@...>
Date: Mon Mar 29, 2010 9:55 am
Subject: Re: disable c-gensym elements? Docs on soaplite are 404
dhoworth@...
Send Email Send Email
 
Jo Rhett wrote:
> There is a page with two links on it about how to disable the c-gensym
elements
>
> http://www.soaplite.com/2003/08/how_do_you_turn.html
>
> Both of the links there are dead, missing page.   Can we update this page
please?

Both pages seem to be in wayback:

<http://web.archive.org/web/20071227185025rn_3/articles.techrepublic.com.com/510\
0-22-1045078.html>
<http://web.archive.org/web/20080114011651/http://www.majordojo.com/archives/200\
3_04.html>

I doubt Byrne would object to them being copied into the soaplite wiki?

Cheers, Dave

#6467 From: Jo Rhett <jrhett@...>
Date: Tue Mar 30, 2010 6:21 am
Subject: Re: AW: with ->call() => $value is different from ->value( $value ) ?
jorhett
Send Email Send Email
 
On Mar 27, 2010, at 2:04 PM, Martin Busik wrote:
> the construct:
>
> SOAP::Data->name( $method )->attr( $SAMAPI ) =>  $SOAPAUTH
> is just a syntactical variant to:
> SOAP::Data->name( $method )->attr( $SAMAPI ), $SOAPAUTH
>
> Then SOAP::Lite recognizes SOAPAUTH as a Header object and serializes
> it in the SOAP:Header.

Clearly ;-)

> The construct
>
> SOAP::Data->name( $method )->attr( $SAMAPI )->value( $SOAPAUTH
>
> instructs SOAP::Lite to put SOAPAUTH inside (->value) of the $method tag.


I guess it's not clear to me why there is a difference.   Even more so since the
documentation seems to indicate that they are equivalent -- they indicate you
can do it either way.   But if they are not equivalent...

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness

#6468 From: Jo Rhett <jrhett@...>
Date: Tue Mar 30, 2010 6:25 am
Subject: Re: disable c-gensym elements? Docs on soaplite are 404
jorhett
Send Email Send Email
 
Well the answer appeared to be "make sure everything has a name".  In short, I was trying to pass in an unnamed reference to an array with two Data objects, thus getting a c-gensym7 element wrapper around the two Data objects.   The fix was to dereference and pass in the array itself, so every element was named and viola, no c-gensys.

On Mar 27, 2010, at 6:35 PM, Joseph Werner wrote:
Seeing as no-one else is answering...

I don't know about the link, but...

I did this by hacking the serializer.  Inherit a class from the serializer and overload the xmlize function to call the base class xmlize and then s{c-gensym}{}xmsg

I'm sure there are cleaner ways, but hey, this worked for me...

Saltbreez

On Fri, Mar 26, 2010 at 10:48 AM, Jo Rhett <jrhett@...> wrote:
 

There is a page with two links on it about how to disable the c-gensym elements

http://www.soaplite.com/2003/08/how_do_you_turn.html

Both of the links there are dead, missing page. Can we update this page please?

--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other randomness




--
I require any third parties to obtain my permission to submit my information to any other party for each such submission. I further require any third party to follow up on any submittal of my information by sending detailed information regarding each such submission to telcodev@...
Joseph Werner

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other randomness


#6469 From: "Randy J. Ray" <rjray@...>
Date: Tue Apr 6, 2010 6:57 pm
Subject: Perl 5.12.0 issues with SOAP::Lite
rjray_perl
Send Email Send Email
 
I haven't tried any code on the newest Perl release-candidate, but someone who
did sent me the following via Twitter:

defined(%hash) is deprecated at
/usr/local/perl-5.12i/lib/site_perl/5.12.0/SOAP/Lite.pm line 465

This also comes up on line 2203, it seems. The "defined(%hash)" mechanism has
been deprecated for a while, I think, so it is something that should be removed
in the next release if at all possible.

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

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

#6470 From: "Martin Busik" <martin.busik@...>
Date: Tue Apr 6, 2010 8:08 pm
Subject: AW: AW: with ->call() => $value is different from ->value( $value ) ?
mbusik70
Send Email Send Email
 
Hi,

> I guess it's not clear to me why there is a difference.

I'll demonstrate it with a different example:

$auth = SOAP::Header->name("aaa");
$param = SOAP::Data->name("ppp");

$proxy->call($method,$authm,$param)

is a variant where SOAP::Lite recognises the Header

$auth = SOAP::Header->name("aaa");
$param = SOAP::Data->name("ppp")->value($auth);

$proxy->call($method,$param)

is a variant where SOAP::Lite does not recognises the header, it is simply
"not there".

I suppose the reason for that behavior is, that SOAP::Header is a subclass
of SOAP::Data, so
you might use SOAP::Header everywhere you may use SOAP::Data. It does not
work vice versa.

I suppose (without checking the source code), that only the parameter list
of the call() method
is checked with respect to SOAP::Header. In contrast, the content of the
supplied parameter is
not checked (this makes in my opinion no sense).

> Even more so since the documentation seems to indicate that
> they are equivalent -- they indicate you can do it either
> way.   But if they are not equivalent...

Which part of the documentation indicates that they are equivalent?

Cheers,
Martin

#6471 From: "precisionlyte" <paul-yahoo@...>
Date: Mon Apr 19, 2010 4:49 pm
Subject: Creating a hash of the soap:Body contents
precisionlyte
Send Email Send Email
 
Hi all,

I have a problem and can't spot how to solve it.  I have Googled and searched
the archive here but can't find anything, so my apologies if this has been
covered in the past.

I need to put a base64 encoded, SHA1 hash of the canonicalized contents of the
soap:Body into a security header of my message.  Creating this value is easy
enough, as is putting it in the right place.  The step I'm having trouble with
is getting the body contents to canonicalize and hash.

I get a method name and chunk of XML (which is to be the sole parameter of my
method) from elsewhere but I need to hash the entire contents of the soap:Body
once the message is created to ensure the correctness of the hash.

Is there an easy way to achieve this, namely extracting the XML to be sent
before the message is sent?

Many thanks,

Paul.

#6472 From: Byrne Reese <byrne@...>
Date: Mon Apr 19, 2010 5:03 pm
Subject: Re: Creating a hash of the soap:Body contents
byrnereese
Send Email Send Email
 
Have you looked at the XML::Sig Perl Module?

On Apr 19, 2010, at 9:49 AM, precisionlyte wrote:

> Hi all,
>
> I have a problem and can't spot how to solve it. I have Googled and searched
the archive here but can't find anything, so my apologies if this has been
covered in the past.
>
> I need to put a base64 encoded, SHA1 hash of the canonicalized contents of the
soap:Body into a security header of my message. Creating this value is easy
enough, as is putting it in the right place. The step I'm having trouble with is
getting the body contents to canonicalize and hash.
>
> I get a method name and chunk of XML (which is to be the sole parameter of my
method) from elsewhere but I need to hash the entire contents of the soap:Body
once the message is created to ensure the correctness of the hash.
>
> Is there an easy way to achieve this, namely extracting the XML to be sent
before the message is sent?
>
> Many thanks,
>
> Paul.
>
>

#6473 From: "jcroall" <jcroall@...>
Date: Tue Apr 20, 2010 2:03 am
Subject: Serializing blessed hash ref changed from 0.710.8 to 0.711?
jcroall
Send Email Send Email
 
Hello,

I have written some (perhaps too clever) code that attempts to enforce a strict
API when calling a web service. Users must pass in blessed hashrefs and these
hashrefs may only have specific fields filled in. The idea was to avoid
headaches caused by typos and the resulting blank fields.

When moving from 0.710.8 to 0.711 this suddenly stopped working. For an array of
these blessed hashrefs, the resulting XML includes the name of the object!

For example, this raw data:

$VAR1 = bless( {
                  'name' => 'TestProject22669',
                  'streams' => [
                                 bless( {
                                          'language' => 'CXX',
                                          'name' => 'TestProject22669',
                                          'type' => 'SOURCE',
                                          'description' => 'Source code stream'
                                        },
'Coverity::WS::ProjectService::streamSpecDataObj' ),
                                 bless( {
                                          'language' => 'CXX',
                                          'name' => 'TestProject22669',
                                          'type' => 'STATIC',
                                          'description' => 'Static Analysis
Stream'
                                        },
'Coverity::WS::ProjectService::streamSpecDataObj' )
                               ],
                  'description' => 'Description of TestProject22669'
                }, 'Coverity::WS::ProjectService::projectSpecDataObj' );


Ends up looking like this:

<soap:Body><ws:createProject><projectSpec><name>TestProject22669</name><streams>\
<Coverity__WS__ProjectService__streamSpecDataObj><language>CXX</language><name>T\
estProject22669</name><type>SOURCE</type><description>Source code
stream</description></Coverity__WS__ProjectService__streamSpecDataObj><Coverity_\
_WS__ProjectService__streamSpecDataObj><language>CXX</language><name>TestProject\
22669</name><type>STATIC</type><description>Static Analysis
Stream</description></Coverity__WS__ProjectService__streamSpecDataObj></streams>\
<description>Description of
TestProject22669</description></projectSpec></ws:createProject></soap:Body>

Note the <Coverity__WS__ProjectService__streamSpecDataObj> tags.

What am I missing?

Thanks,

- James

Messages 6443 - 6473 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