Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

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

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1205
  • Category: Protocols
  • Founded: Jan 28, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 6099 - 6128 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#6099 From: Peter Hartmann <phartman@...>
Date: Fri Feb 1, 2008 4:02 pm
Subject: sending xsd:complexType in SOAP request
huberhans90
Send Email Send Email
 
Hello,

i have the following problem: I built the stubcode of the Amazon web
services via "stubmaker.pl
http://soap.amazon.com/schemas2/AmazonWebServices.wsdl". This WSDL
requires complex types submitted in a request. I tried something like

-------------------------------------------
my $ds = new AmazonSearchService;
my @complextype = (SOAP::Data->name("author" => "Mann"),
                    SOAP::Data->name("page" => "1"),
                    SOAP::Data->name("mode" => "just"),
                    SOAP::Data->name("tag" => "a"),
                    SOAP::Data->name("type" => "try"),
                    SOAP::Data->name("devtag" => "...")
                   );
$som = $ds->AuthorSearchRequest(@complextype);
-------------------------------------------

to embed a complex type into the call; but what happens is that the
types are added after the call:

-------------------------------------------
...<soap:Body><typens:AuthorSearchRequest><AuthorSearchRequest
xsi:nil="true" xsi:type="typens:AuthorRequest" /><page
xsi:type="xsd:int">1</page><mode xsi:type="xsd:string">just</mode><tag
xsi:type="xsd:string">a</tag><type
xsi:type="xsd:string">try</type><devtag
xsi:type="xsd:string">...</devtag></typens:AuthorSearchRequest></soap:Body>...
-------------------------------------------

does anybody know how to pass complex types in a method call?

Thanks in advance,
Peter

#6100 From: "huberhans90" <phartman@...>
Date: Fri Feb 1, 2008 4:11 pm
Subject: sending xsd:complexType in SOAP request
huberhans90
Send Email Send Email
 
Hello,

i have the following problem: I built the stubcode of the Amazon web
services via "stubmaker.pl
http://soap.amazon.com/schemas2/AmazonWebServices.wsdl". This WSDL
requires complex types submitted in a request. I tried something like

-------------------------------------------
my $ds = new AmazonSearchService;
my @complextype = (SOAP::Data->name("author" => "Mann"),
                    SOAP::Data->name("page" => "1"),
                    SOAP::Data->name("mode" => "just"),
                    SOAP::Data->name("tag" => "a"),
                    SOAP::Data->name("type" => "try"),
                    SOAP::Data->name("devtag" => "...")
                   );
$som = $ds->AuthorSearchRequest(@complextype);
-------------------------------------------

to embed a complex type into the call; but what happens is that the
types are added after the call:

-------------------------------------------
...<soap:Body><typens:AuthorSearchRequest><AuthorSearchRequest
xsi:nil="true" xsi:type="typens:AuthorRequest" /><page
xsi:type="xsd:int">1</page><mode xsi:type="xsd:string">just</mode><tag
xsi:type="xsd:string">a</tag><type
xsi:type="xsd:string">try</type><devtag
xsi:type="xsd:string">...</devtag></typens:AuthorSearchRequest></soap:Body>...
-------------------------------------------

does anybody know how to pass complex types in a method call?

Thanks in advance,
Peter

#6101 From: Eric Bridger <eric@...>
Date: Fri Feb 1, 2008 10:05 pm
Subject: Re: sending xsd:complexType in SOAP request
ebridger2004
Send Email Send Email
 
I would not use stubmaker.pl since you are doing all the work
yourself it doesn't really give you anything.
The altermative (which I did once long ago) is to edit the
AmazonSearchSevice.pm generated by stubmaker.pl, search for your
method and edit it so it knows what complex type to expect.  But the
code generated by stubmaker.pl can be cryptic.

That's why you should try rolling your own connection to the Amazon
and then your code below should work.

Eric

On Feb 1, 2008, at 11:02 AM, Peter Hartmann wrote:

> Hello,
>
> i have the following problem: I built the stubcode of the Amazon web
> services via "stubmaker.pl
> http://soap.amazon.com/schemas2/AmazonWebServices.wsdl". This WSDL
> requires complex types submitted in a request. I tried something like
>
> -------------------------------------------
> my $ds = new AmazonSearchService;
> my @complextype = (SOAP::Data->name("author" => "Mann"),
> SOAP::Data->name("page" => "1"),
> SOAP::Data->name("mode" => "just"),
> SOAP::Data->name("tag" => "a"),
> SOAP::Data->name("type" => "try"),
> SOAP::Data->name("devtag" => "...")
> );
> $som = $ds->AuthorSearchRequest(@complextype);
> -------------------------------------------
>
> to embed a complex type into the call; but what happens is that the
> types are added after the call:
>
> -------------------------------------------
> ...<soap:Body><typens:AuthorSearchRequest><AuthorSearchRequest
> xsi:nil="true" xsi:type="typens:AuthorRequest" /><page
> xsi:type="xsd:int">1</page><mode xsi:type="xsd:string">just</mode><tag
> xsi:type="xsd:string">a</tag><type
> xsi:type="xsd:string">try</type><devtag
> xsi:type="xsd:string">...</devtag></typens:AuthorSearchRequest></
> soap:Body>...
> -------------------------------------------
>
> does anybody know how to pass complex types in a method call?
>
> Thanks in advance,
> Peter
>
>

#6102 From: Craig Dunigan <cdunigan@...>
Date: Mon Feb 4, 2008 3:43 pm
Subject: Re: sending xsd:complexType in SOAP request
craigdunigan62
Send Email Send Email
 
I'm pretty sure stubmaker.pl can't handle complex types.  To pass a
complex type, you'll actually have to pass your array as the complex
type name required by the method with a value of a ref to a
SOAP::Data->value encapsulating your array, and not just a parameter
to the method.  It's also important to remember that the method name
is *not* the name of the complex type required in the request doc.
That is, try to think more of the request as a document that you pass
to a service name, not as the parameter of a remote method call.  The
request doc contains a named complex type, and that doc is passed to a
named service, and you need both names.

It's probably better illustrated as code:

my $ds = new AmazonSearchService;
my @complextype = (SOAP::Data->name("author" => "Mann"),
                     SOAP::Data->name("page" => "1"),
                     SOAP::Data->name("mode" => "just"),
                     SOAP::Data->name("tag" => "a"),
                     SOAP::Data->name("type" => "try"),
                     SOAP::Data->name("devtag" => "...")
                    );
# Amazon's AuthorSearchRequest method accepts a complex type named
"AuthorRequest"
# which is not the same as the method name "AuthorSearchRequest"
$som = $ds->AuthorSearchRequest("AuthorRequest" =>
\SOAP::Data->value(@complextype));


where ' "AuthorRequest" => \SOAP::Data->value(@complextype) ' is the
request document, and  ' $ds->AuthorSearchRequest ' is the service
name that document is being passed to.



I learned this from:

http://tardate.blogspot.com/2007/02/complex-soaplite-requests-my-rules-for.html

which is the first link on:

http://www.soaplite.com/

and from a quick search for "AuthorSearchRequest", which turned up a
number of links telling me what the format of the request document
should be (most especially, the name of the required complex type).

And yes, that does mean you have to nest refs if you have a
multi-level complex type.  Oh, and if the service you're talking to
can't handle SOAP::Lite's autotyping (.Net comes to mind), you'll have
to explicitly "turn off" autotyping by adding ' type->("") ' to each
of your 'SOAP::Data->name' and 'SOAP::Data->value' calls, like this:

my @complextype = (SOAP::Data->name("author" => "Mann")->type(""),
<snip>
$som = $ds->AuthorSearchRequest("AuthorRequest" =>
\SOAP::Data->value(@complextype)->type(""));


Hope this helps.

--
Craig Dunigan
IS Technical Services Specialist
Middleware - EIS - DoIT
University of Wisconsin, Madison

opinions expressed are my own, not the University's

On Fri, 1 Feb 2008, Eric Bridger wrote:

> I would not use stubmaker.pl since you are doing all the work
> yourself it doesn't really give you anything.
> The altermative (which I did once long ago) is to edit the
> AmazonSearchSevice.pm generated by stubmaker.pl, search for your
> method and edit it so it knows what complex type to expect.  But the
> code generated by stubmaker.pl can be cryptic.
>
> That's why you should try rolling your own connection to the Amazon
> and then your code below should work.
>
> Eric
>
> On Feb 1, 2008, at 11:02 AM, Peter Hartmann wrote:
>
>> Hello,
>>
>> i have the following problem: I built the stubcode of the Amazon web
>> services via "stubmaker.pl
>> http://soap.amazon.com/schemas2/AmazonWebServices.wsdl". This WSDL
>> requires complex types submitted in a request. I tried something like
>>
>> -------------------------------------------
>> my $ds = new AmazonSearchService;
>> my @complextype = (SOAP::Data->name("author" => "Mann"),
>> SOAP::Data->name("page" => "1"),
>> SOAP::Data->name("mode" => "just"),
>> SOAP::Data->name("tag" => "a"),
>> SOAP::Data->name("type" => "try"),
>> SOAP::Data->name("devtag" => "...")
>> );
>> $som = $ds->AuthorSearchRequest(@complextype);
>> -------------------------------------------
>>
>> to embed a complex type into the call; but what happens is that the
>> types are added after the call:
>>
>> -------------------------------------------
>> ...<soap:Body><typens:AuthorSearchRequest><AuthorSearchRequest
>> xsi:nil="true" xsi:type="typens:AuthorRequest" /><page
>> xsi:type="xsd:int">1</page><mode xsi:type="xsd:string">just</mode><tag
>> xsi:type="xsd:string">a</tag><type
>> xsi:type="xsd:string">try</type><devtag
>> xsi:type="xsd:string">...</devtag></typens:AuthorSearchRequest></
>> soap:Body>...
>> -------------------------------------------
>>
>> does anybody know how to pass complex types in a method call?
>>
>> Thanks in advance,
>> Peter
>>
>>
>
>

#6103 From: "rvanveen_nl" <rvanveen_nl@...>
Date: Mon Feb 4, 2008 2:40 pm
Subject: Serialize complex type
rvanveen_nl
Send Email Send Email
 
How can I serialize complex types in soap lite (using wsdl).

The message should look like this.
(The Wsdl has defined types such as Metrics.)

<message>
<logtext>Any text </logtext>
<metrics>
  <name>foo<value>bar
  <name>foo<value>bar
....
.....
</metrics>
</message>


Code (parts of it):

use SOAP::Lite;
import SOAP::Data 'name';
......
....
$service=SOAP::Lite -> service($wsdlUrl) ;

         my $metrics=name('metrics' =>
             name("elem1" =>
                      name("name" => 'foo1'),
                      name("value" => 'bar1')
                  ),
             name("elem2" =>
                      name("name" => 'foo2'),
                      name("value" => 'bar2')
                 )
            )->type('Metrics')
           ;

         $res=$service->batchRegisterStarted($interfaceCode,$metrics)  ;


Roland.

#6104 From: Paco Regodón <francisco@...>
Date: Mon Feb 4, 2008 11:00 pm
Subject: Problem with EncodingStyle
francisco@...
Send Email Send Email
 
Hello,

I am using SOAP::Data to build a request to a SOAP server. I send ir with SOAP::Lite, generating this request XML:

<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="http://www.w3.org/1999/XMLSchema"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Body>
            <login xmlns="">
                <request>
                    <username xsi:type="xsd:string">USERNAME</username>
                    <password xsi:type="xsd:string">PASSWORD</password>
                </request>
            </login>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>


The problem comes with the red line SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/". Remote server seems to crash with my request since i get this response:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>INTERNAL_ERROR</faultstring>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


If i remove that SOAP-ENV:encodingStyle line, request works fine. Why am i getting this error? Is the remote server a non standard one? Is it a bug in SOAP::Lite? How can i remove encodingStyle from my envelope?

Thanks for your help.

Paco



#6105 From: Andrei Ivanov <andrei.i.ivanov@...>
Date: Tue Jan 29, 2008 11:52 am
Subject: How to get access to the array paramter ate the server side, code sample
ensen_andy
Send Email Send Email
 
Client side:
     my @d;
     $i = 0;
     while (<STDIN>) {
         chomp;
         @d[$i] =
SOAP::Data->name('appointment')->type('appointment')->value(
             [
             SOAP::Data->name('status')->type('int')->value($status),
             ...

SOAP::Data->name('flags')->type('int')->value($flags)
             ]);
         $i++;
     }
     close(FID);
     $query = new CGI;
     $service = SOAP::Lite -> uri('meetup#getappointments')
         -> proxy('http://' . $host . $p);
     $som = $service -> getappointments(9, $pre_zonenum, $tu, $u,
$starts, $ends, $pwd,
         SOAP::Data->name("appointments" =>
[@d])->type("appointment")->type("appointments"));


Server side:
package meetup;
use SOAP::Data;
use SOAP::SOM;
use vars qw(@ISA);
@ISA = qw(SOAP::Server::Parameters);

...

sub getappointments {
     shift;
     my $ttl = shift;
     ...
     my $password = shift;
     my @appointments = shift;
     my $envelope = pop;

dolog("appointments: " . @appointments); # return 1, how to get access
to the array?

     my @parameters = pop->dataof(SOAP::SOM::paramsin); # it causes error
"Can't locate object method "dataof" via package "appointments"

How I can get access to passed array?

--
Best regards,
Andrei Ivanov

phone     tel:+7 (901) 924 0456
e-mail    mailto:andrei.i.ivanov@...
web page: http://commandus.com/
VoIP:     sip:50000@...
G-Talk:   jid:andrei.i.ivanov

#6106 From: Gomathi Muthiah <jobcookies2@...>
Date: Mon Feb 4, 2008 10:25 am
Subject: opening with CMMi Level 4 Company Perl/PHP lead and Developer
jobcookies2
Send Email Send Email
 
Dear Friends
 
 
Greetings from Gomathi - Job Cookies,
 
I represent one of the leading IT consultancies called Job Cookies. Job Cookies is a dynamic and fast-growing Information Systems Consulting Firm. A Singapore based firm, which was incorporated with a commitment to provide appropriate solutions to clients in the areas of Recruitment and Human Resources Consultancy. Our Management team has over 10 years of Industry experience, ready for you to take advantage of.  We provide Placement Services for some of the Top MNC’s Abroad.
 
Currently we have an opening for (Perl,PHP) Professionals with our client in (ChennaiLocation).
 
Skill Sets:
 
Incumbent must have strong experience in PERL/PHP - Developer  and Lead
 
 
Experience          : 3- 8 Years
 
Work Location   : Chennai
 
Position Type     : Permanent
 
Compensation   : Best in the Industry
 
Interested candidates kindly send in your resumes to us with the following details:
 
Total Experience
Relevant Experience
Current CTC
Expected CTC
Earliest Joining Date
Current Location
Preferred Location
 
Regards,
Gomathi Muthiah - Team Leader
Job Cookies India Pvt. Ltd.
#23,Vasu Street | Kilpauk | Chennai -10

Direct Number: 91-44-30584318

Url:  www.jobcookies.com
 


Looking for last minute shopping deals? Find them fast with Yahoo! Search.

#6107 From: Peter Hartmann <phartman@...>
Date: Tue Feb 5, 2008 8:24 am
Subject: Re: sending xsd:complexType in SOAP request
huberhans90
Send Email Send Email
 
Craig Dunigan wrote:
> I'm pretty sure stubmaker.pl can't handle complex types.

Ok, thanks for clearing this up.
For those of you who want to pass complex types to a web service without
dealing with the correct namespaces etc. by hand, you might want to try
out SOAP::WSDL (http://soap-wsdl.sourceforge.net/ and
http://search.cpan.org/~mkutter/SOAP-WSDL-2.00_29/lib/SOAP/WSDL.pm). It
is still beta and returned an error when I tried to create code from the
Amazon WSDL, but it is worth a try.

Regards,
Peter


   To pass a
> complex type, you'll actually have to pass your array as the complex
> type name required by the method with a value of a ref to a
> SOAP::Data->value encapsulating your array, and not just a parameter to
> the method.  It's also important to remember that the method name is
> *not* the name of the complex type required in the request doc. That is,
> try to think more of the request as a document that you pass to a
> service name, not as the parameter of a remote method call.  The request
> doc contains a named complex type, and that doc is passed to a named
> service, and you need both names.
>
> It's probably better illustrated as code:
>
> my $ds = new AmazonSearchService;
> my @complextype = (SOAP::Data->name("author" => "Mann"),
>                    SOAP::Data->name("page" => "1"),
>                    SOAP::Data->name("mode" => "just"),
>                    SOAP::Data->name("tag" => "a"),
>                    SOAP::Data->name("type" => "try"),
>                    SOAP::Data->name("devtag" => "...")
>                   );
> # Amazon's AuthorSearchRequest method accepts a complex type named
> "AuthorRequest"
> # which is not the same as the method name "AuthorSearchRequest"
> $som = $ds->AuthorSearchRequest("AuthorRequest" =>
> \SOAP::Data->value(@complextype));
>
>
> where ' "AuthorRequest" => \SOAP::Data->value(@complextype) ' is the
> request document, and  ' $ds->AuthorSearchRequest ' is the service name
> that document is being passed to.
>
>
>
> I learned this from:
>
>
http://tardate.blogspot.com/2007/02/complex-soaplite-requests-my-rules-for.html
>
>
> which is the first link on:
>
> http://www.soaplite.com/
>
> and from a quick search for "AuthorSearchRequest", which turned up a
> number of links telling me what the format of the request document
> should be (most especially, the name of the required complex type).
>
> And yes, that does mean you have to nest refs if you have a multi-level
> complex type.  Oh, and if the service you're talking to can't handle
> SOAP::Lite's autotyping (.Net comes to mind), you'll have to explicitly
> "turn off" autotyping by adding ' type->("") ' to each of your
> 'SOAP::Data->name' and 'SOAP::Data->value' calls, like this:
>
> my @complextype = (SOAP::Data->name("author" => "Mann")->type(""),
> <snip>
> $som = $ds->AuthorSearchRequest("AuthorRequest" =>
> \SOAP::Data->value(@complextype)->type(""));
>
>
> Hope this helps.
>

#6108 From: "jwalsh999" <jwalsh999@...>
Date: Sat Feb 9, 2008 4:24 am
Subject: hibye demo - not well-formed (invalid token) error
jwalsh999
Send Email Send Email
 
Brand new SOAP::Lite user here. I am trying to get the hibye demo
working locally on my laptop running Ubuntu Ultimate 7.10.

The hibye.pl script works when connecting to www.soaplite.com but
fails when I attempt to connect to localhost. I have seen this problem
discussed a few times and have tried the suggestions but I am still
getting the same error:

not well-formed (invalid token) at line 1, column 1, byte 1 at
/usr/lib/perl5/XML/Parser.pm line 187

hibye.pl:

#!/usr/bin/perl -w

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

print SOAP::Lite
   -> readable(1)
   -> uri('urn:Demo')
   -> proxy('http://localhost/hibye.cgi')
   -> hi()
   -> result;

hibye.cgi:

#!/usr/bin/perl -w

# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul
Kulchenko --

use SOAP::Transport::HTTP;

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

package Demo;

sub hi {
   return "hello, world";
}

sub bye {
   return "goodbye, cruel world";
}

sub languages {
   return ("Perl", "C", "sh");
}


Here is the trace:

./hibye2.pl
SOAP::Transport::HTTP::Client::send_receive: POST
http://127.0.1.1/hibye.cgi HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 448
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Demo#hi"

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <hi xmlns="urn:Demo" xsi:nil="true" />
       </soap:Body>
</soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Date: Sat, 09 Feb 2008 04:08:39 GMT
Accept-Ranges: bytes
ETag: "36015f-19d-5d331780"
Server: Apache/2.2.4 (Ubuntu) mod_fastcgi/2.4.2 mod_python/3.3.1
Python/2.5.1 PHP/5.2.3-1ubuntu6.3 mod_perl/2.0.2 Perl/v5.8.8
Content-Length: 413
Content-Type: text/plain
Last-Modified: Sat, 09 Feb 2008 03:33:02 GMT
Client-Date: Sat, 09 Feb 2008 04:08:39 GMT
Client-Peer: 127.0.1.1:80
Client-Response-Num: 1

#!/usr/bin/perl -w

# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul
Kulchenko --

use SOAP::Transport::HTTP;

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

package Demo;

sub hi {
   return "hello, world";
}

sub bye {
   return "goodbye, cruel world";
}

sub languages {
   return ("Perl", "C", "sh");
}

not well-formed (invalid token) at line 1, column 1, byte 1 at
/usr/lib/perl5/XML/Parser.pm line 187
#!/usr/bin/perl -w

# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul
Kulchenko --

use SOAP::Transport::HTTP;

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

package Demo;

sub hi {
   return "hello, world";
}

sub bye {
   return "goodbye, cruel world";
}

sub languages {
   return ("Perl", "C", "sh");
}
  at ./hibye2.pl line 5


Any help would be appreciated.

#6109 From: "axelelfner" <axel.elfner@...>
Date: Mon Feb 11, 2008 3:08 am
Subject: help with daemon server and WSDL
axelelfner
Send Email Send Email
 
I have a SOAP server that runs in daemon mode and am able to talk to
it fine with a client (SOAP object) built using the uri + proxy
methods, but I cannot get a client to communicate correctly via a SOAP
object built using the service method.  I have consulted every doc I
can find, but what's missing in each example is a complete working
scenario showing all the components - client, server (including any
packages), and the WSDL file.  It may be that the the cited examples
are all for CGI servers instead of daemon servers, but I'm not sure,
and have exhausted the permutations I can think of.  Simple stubs
would be enough to extrapolate from.  Appreciate any assistance.
Thank you.

#6110 From: "Andrei Ivanov" <andrei.i.ivanov@...>
Date: Mon Feb 11, 2008 8:41 am
Subject: Access to array
ensen_andy
Send Email Send Email
 
Hi, how can I get access to the SOAP::Data structure with brackets []

I have an array of items such:

<namesp1:findrecResponse xmlns:namesp1="meetup">
  <result xsi:type="namesp2:items">
   <item xsi:type="namesp2:item" SOAP-ENC:arrayType="xsd:ur-type[13]">
    <phone xsi:type="xsd:string">5551256</phone>
    ...
    <radius xsi:type="xsd:float">100</ends>
   </item>
</result>

I need to sort produced SOAP::Data structure by the radius at the
server side before send result to the client:

       	 foreach $u (keys %h) {
		 ...
		 @r = (
			 SOAP::Data->name('phone')->type('string')-
>value($serialize[2])
			 ...
			 SOAP::Data->name('radius')->type('float')-
>value($serialize[16])
		 );
		 push @ra, SOAP::Data->name('item'=>[@r])-
>type('item');

	 }
	 # sort array
	 my @rb = sort { mysortfunc($a) <=> mysortfunc($b} @ra;
	 return SOAP::Data->name("result" => \SOAP::Data->value(
		 SOAP::Data->name("item" => @ra)->type("item"))
		 )->type("items");

	 ...


sub mysortfunc {
	 my @r = shift;
	 ...
	 return @r;
}

Beacuse I need to use brackets [@r] to produce valid structure, but I
can not get access to the item.
First is an array, then SOAP::Data hash, then array, then SOAP::Data
hash and then just arrays.

#6111 From: "occasoblu" <giuliah@...>
Date: Wed Feb 13, 2008 10:50 pm
Subject: Client through Apache module error
occasoblu
Send Email Send Email
 
Hi,

I have a SOAP client call within an Apache module which is giving me
an error, however when I use the same code from the command line I
can easily get the connection, so I'm speculating that the issue is
with the call being within the .pm

The code is the following. I have it split to debug better.
use SOAP::Lite;
....
     my $proxy = SOAP::Lite
	 ->  uri("https://bspace-dev-01/sakai-axis")
	 -> proxy("https://bspace-dev-01/sakai-axis/SakaiSigning.jws?
wsdl");

     $r->log_error("bSpace proxy: $proxy); #DEBUG

     $reply = $proxy
	 -> testsign($bSpaceToken)
	 -> result;

The DEBUG statement is printed correctly and I get
  bSpace proxy: SOAP::Lite=HASH(0x56ba48)

however the second assignement fails with the error
400 URL missing at /opt/apache/http-
bSpace8090/lib/Apache/LocalAuth.pm line 178

where line 178 is the $reply line. I have printed out the proxy hash
in both the case of a standalone code and the one withing the Apache
module, and they are pretty similar.

Any suggestion on how to approach this problem?

Thanks,

Giulia

#6112 From: "winfinit" <winfinit@...>
Date: Tue Feb 19, 2008 6:11 pm
Subject: change envelope namespaces
winfinit
Send Email Send Email
 
hello,

how do i change the way my envelope looks, in fact i want to define
myself how it will look, currently it is similar to this

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SomethingHere>BLAH</SomethingHere
  </soap:Body>
</soap:Envelope>

but what i want to do is
<?xml version="1.0" encoding="UTF-8"?>
<MyMethod>
     <SomethingHere>blah</SomethingHere>
</MyMethod>

so i want to get rid of <soap::Envelope> and <soap:Body>, so i can
create my own xml data that i will send to another server.

please help :)
thank you

#6113 From: "Luis" <luis@...>
Date: Wed Feb 20, 2008 10:03 pm
Subject: Help with ns
luissanchez
Send Email Send Email
 
Hi,

How can I obtain a xml output like this:

<soap:Body>
   <OTA_HotelDescriptiveInfoRQ
xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="123456"
PrimaryLangID="ES">
     <INFO>
       Other_soap_data_info ...
     </INFO>
   </OTA_HotelDescriptiveInfoRQ>
</soap:Body>


In my perl script I wrote this:

$xml_soap = SOAP::Data->name('OTA_HotelDescriptiveInfoRQ')
                              ->attr({'EchoToken'=>'123456',
                                      'PrimaryLangID'=>'ES'})
                               ->value($other_soap_data_info);
$soap -> ns('http://www.opentravel.org/OTA/2003/05');
$soap->OTA_HotelDescriptiveInfoRQ( $xml_soap );

But I have this:

<soap:Body>
   <OTA_HotelDescriptiveInfoRQ
xmlns="http://www.opentravel.org/OTA/2003/05">
     <INFO>
       Other_soap_data_info ...
     </INFO>
   </OTA_HotelDescriptiveInfoRQ>
</soap:Body>

#6114 From: "t_elia" <electra@...>
Date: Tue Feb 26, 2008 9:56 am
Subject: soap:lite service returning complex types-interoperability problems on clients
t_elia
Send Email Send Email
 
In soap::lite perl service, the get_srvorder_details method returns
the following complex structure:

sub get_srvorder_details{
    my @srv = ( format_general_out($$ret{err_info}));

    return SOAP::Data->name("result")->attr({"xmlns:tns1"=>URI})->type(
    "tns1:item_get_srvorder_details")->value(\SOAP::Data->value(@srv));
}

sub format_general_out{
   my @gen = (
     SOAP::Data->name("err_code"=>$$gn{err_code})->type("int"),
     SOAP::Data->name("err_text"=>$$gn{err_text})->type("string"));

   return SOAP::Data->name( "err_info" )->attr( {"xmlns:tns1" => URI} )
     ->type( "tns1:General_out" )->value( \SOAP::Data->value(@gen));
}

I have created the wsdl file for this service using POD::WSDL tool. I
use this generated file to create the necessary client/proxy in java
and it works fine(the result is returned), but when i do the same in
C# .NET in the response returned is null.

Does anyone encountered this error before? What i am doing wrong? I
have placed the necessary serializers for the methods on the server
as well but nothing works.

#6115 From: "mharidev" <mharidev@...>
Date: Wed Feb 27, 2008 5:28 am
Subject: Using SOAP::Lite Perl client with gSOAP C/C++ server
mharidev
Send Email Send Email
 

Hello,

I'm a newbie to SOAP and working on implementing a SOAP::Lite Perl client to invoke a function  "getUint64ArrayValues" on a gSOAP server.

I was able to successfully implement a python client that can make requests (input params are 2 arrays : (1)keys=[strings...] and (2)indices=[unsignedints...] and receives responses from the gSOAP server(output params:(1)statusCodes=[strings...] and (2)values=[[uint64][uint64]...] . But I'm having trouble trying the same thing using SOAP::Lite Perl.

Here's the code snippet for my Perl client :

=================================

#!perl -w

use strict;
use SOAP::Lite on_action => sub {sprintf '%s/%s', @_}, 'trace', 'debug';

my @tkeys = ('FLStats'); #array of strings
my $k = SOAP::Data->type(array => \@tkeys)->name('keys');
my @tindices = (); #array of unsignedints
my $i = SOAP::Data->type(array => \@tindices)->name('indices');
my $server = SOAP::Lite
    ->  proxy('http://localhost:15000')
    ->  uri("testWF");

my $response = $server->getUint64ArrayValues($k, $i);

=================================


The corresponding SOAP request/response  for Perl client is below:

SOAP::Transport::HTTP::Client::send_receive: POST http://localhost:15000 HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 668
Content-Type: text/xml; charset=utf-8
SOAPAction: testWF/getUint64ArrayValues

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:namesp1="http://namespaces.soaplite.com/perl" 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/"><soap:Body><getUint64ArrayValues xmlns="testWF"><keys soapenc:arrayType="xsd:string[1]" xsi:type="namesp1:array"><item xsi:type="xsd:string">FLStats</item></keys><indices soapenc:arrayType="xsd:anyType[0]" xsi:type="namesp1:array" /></getUint64ArrayValues></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Server: gSOAP/2.7
Content-Length: 522
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 27 Feb 2008 04:39:36 GMT
Client-Peer: 10.45.214.58:15000
Client-Response-Num: 1

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:yodaWF="testWF"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><WF-Uint64ArrayValueListResult><statusCodes></statusCodes><values></values></WF-Uint64ArrayValueListResult></SOAP-ENV:Body></SOAP-ENV:Envelope>
=================================

The SOAP request/response for my successful Python client for same gSOAP Server looks like this:

========================================

<?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:getUint64ArrayValues xmlns:ns1="testWF" SOAP-ENC:root="1">
<indices SOAP-ENC:arrayType="xsd:SOAPStruct[0]" xsi:type="SOAP-ENC:Array">
</indices>
<keys SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array">
<keys>FLStats</keys>
</keys>
</ns1:getUint64ArrayValues>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:testWF="testWF"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><WF-Uint64ArrayValueListResult><statusCodes><statusCodes>WF-STATUS-OK</statusCodes></statusCodes><values><arrays><values>1149</values><values>0</values><values>0</values><values>862</values><values>287</values><values>0</values></arrays></values></WF-Uint64ArrayValueListResult></SOAP-ENV:Body></SOAP-ENV:Envelope>
************************************************************************

Snippets from WSDL for the complex types used in SOAP request/response are below:

 <message name='getUint64ArrayValues'>
    <part name='keys' type='testWF:WF-KeyList'/>
    <part name='indices' type='testWF:WF-Indices'/>
 </message>

<complexType name='WF-Indices'>
        <sequence>
          <element minOccurs='0' maxOccurs='unbounded' name='indices' type='xsd:unsignedLong'/>
        </sequence>
</complexType>
<complexType name='WF-KeyList'>
        <sequence>
          <element minOccurs='0' maxOccurs='unbounded' name='keys' type='xsd:string'/>
        </sequence>
  </complexType>

 <message name='WF-Int64ArrayValueListResult'>
    <part name='statusCodes' type='testWF:WF-StatusList'/>
    <part name='values' type='testWF:WF-Int64ArrayValueList'/>
 </message>
  <message name='WF-StatusList'>
    <part name='statusCodes' type='yodaWF:WF-StatusCode'/>
  </message>

<simpleType name='WF-StatusCode'>
        <restriction base='xsd:string'>
          <enumeration value='WF-STATUS-OK'/>
          <enumeration value='WF-STATUS-NOT-FOUND'/>
          <enumeration value='WF-STATUS-NO-KEY'/>
        </restriction>
</simpleType>

<complexType name='WF-Uint64ArrayValueList'>
        <sequence>
          <element minOccurs='0' maxOccurs='unbounded' name='arrays' type='yodaWF:WF-Uint64ValueList'/>
        </sequence>
</complexType>

=======================================

Any pointers to what I'm doing wrong in my Perl client? Any help is much appreciated!

Thanks,

Meghana.


#6116 From: "~Dushi~" <dushidushy@...>
Date: Fri Mar 7, 2008 8:23 pm
Subject: SOAP::Lite Newbie WINDOWS - PLEASE HELP
dushidushy
Send Email Send Email
 
Hi Everyone!

I am trying to SETUP CGI based web services using SOAP::LITE on
WINDOWS XP (SERVICE PACK 2) having IIS 5.1.

Have installed all necessary modules using PERL PPM manager
(SOAP::LITE VERSION 0.69) and all its dependencies.
When running following soap lite examples hibye.pl (as detailed
bellow), its working fine.
---------------------------------------
  1.a. client 	 	 (hibye.pl)
   #!perl -w
   use SOAP::Lite;
   print SOAP::Lite
     -> uri('http://www.soaplite.com/Demo')
     -> proxy('http://services.soaplite.com/hibye.cgi')
     -> hi()
     -> result;
----------------------------------------

I have a CGI folder under IIS root folder, configured to use Perl and
my normal CGI pages working fine. I have placed  hibye.cgi file under
  CGI folder. Changed hibye.pl uri and proxy address to:
     -> uri('http://localhost/cab/cgi')
     -> proxy('http://localhost/cab/cgi/hibye.cgi')
-------------------------------------
1.b. server 	 	 (hibye.cgi)
   #!perl -w
   use SOAP::Transport::HTTP;
   SOAP::Transport::HTTP::CGI
    -> dispatch_to('Demo')
     -> handle;
   package Demo;
   sub hi {
     return "hello, world";
   }
   sub bye {
     return "goodbye, cruel world";
   }
   sub languages {
     return ("Perl", "C", "sh");
   }
---------------------------------------
When I try running hibye.pl its not outputting anything, no error
messages either.
I am expecting to print "hello,world"

Any Ideas what went wrong??

THANKS FOR UR TIME N HELP

Cheers
Dushi

#6117 From: "bennychee" <bennychee@...>
Date: Mon Mar 10, 2008 11:59 am
Subject: Help with ComplexType
bennychee
Send Email Send Email
 
I have the following ComplexType definitions for IP address, how do i define the
data
type? I have the following defined but not getting the result i wanted.

   $ip = "1.1.1.1";
   my $networkAddress = SOAP::Data->type(NetworkAddress =>
     \SOAP::Data->value(
       \SOAP::Data->value(String => $ip),
       \SOAP::Data->value(NetworkAddressType =>
         \SOAP::Data->value(String => "IPV4")
       )
     )
   );
   my $tc = SOAP::Data->type(TrafficClassifier => $networkAddress);
   $result = $s->startSession($username, $tc);

<xsd:complexType name="TrafficClassifier">
   <xsd:sequence>
     <xsd:element name="networkAddress" nillable="false"
type="impl:NetworkAddress">
     </xsd:element>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="NetworkAddress">
   <xsd:sequence>
     <xsd:element name="value" nillable="false" type="xsd:string">
     </xsd:element>
     <xsd:element name="type" nillable="false" type="impl:NetworkAddressType">
     </xsd:element>
   </xsd:sequence>
</xsd:complexType>

<xsd:simpleType name="NetworkAddressType">
   <xsd:restriction base="xsd:string">
     <xsd:enumeration value="IPV4">
     </xsd:enumeration>
     <xsd:enumeration value="IPV6">
     </xsd:enumeration>
   </xsd:restriction>
</xsd:simpleType>

#6118 From: "bennychee" <bennychee@...>
Date: Tue Mar 11, 2008 3:45 pm
Subject: Re: Help with ComplexType
bennychee
Send Email Send Email
 
hi all,

   Manage to get it translated. cheers.

   my $tclass = SOAP::Data->name("trafficClassifier" =>
    \SOAP::Data->value(
     SOAP::Data->name("networkAddress" =>
      \SOAP::Data->value(
       SOAP::Data->name("value" => $ip),
       SOAP::Data->name("type" => "IPV4")->type("impl:NetworkAddressType")
      )
     )
    )
   );

--- In soaplite@yahoogroups.com, "bennychee" <bennychee@...> wrote:
>
> I have the following ComplexType definitions for IP address, how do i define
the data
> type? I have the following defined but not getting the result i wanted.
>
>   $ip = "1.1.1.1";
>   my $networkAddress = SOAP::Data->type(NetworkAddress =>
>     \SOAP::Data->value(
>       \SOAP::Data->value(String => $ip),
>       \SOAP::Data->value(NetworkAddressType =>
>         \SOAP::Data->value(String => "IPV4")
>       )
>     )
>   );
>   my $tc = SOAP::Data->type(TrafficClassifier => $networkAddress);
>   $result = $s->startSession($username, $tc);
>
> <xsd:complexType name="TrafficClassifier">
>   <xsd:sequence>
>     <xsd:element name="networkAddress" nillable="false"
type="impl:NetworkAddress">
>     </xsd:element>
>   </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="NetworkAddress">
>   <xsd:sequence>
>     <xsd:element name="value" nillable="false" type="xsd:string">
>     </xsd:element>
>     <xsd:element name="type" nillable="false" type="impl:NetworkAddressType">
>     </xsd:element>
>   </xsd:sequence>
> </xsd:complexType>
>
> <xsd:simpleType name="NetworkAddressType">
>   <xsd:restriction base="xsd:string">
>     <xsd:enumeration value="IPV4">
>     </xsd:enumeration>
>     <xsd:enumeration value="IPV6">
>     </xsd:enumeration>
>   </xsd:restriction>
> </xsd:simpleType>
>

#6119 From: "Mark Knoop" <mark@...>
Date: Wed Mar 12, 2008 10:44 am
Subject: Error handling when reading WSDL
marknoop2002
Send Email Send Email
 
Hi

I have a script which does something like the following (this is an example
for test purposes using some public service):
###
use strict;
use warnings;
use SOAP::Lite;
use Data::Dumper;
my $service =
SOAP::Lite->service('http://ws.cisa.ca/WehireWS/JobsWs.asmx?WSDL');
my $result = $service->GetAll;
print Dumper($result);
###

I get the output:

###
$VAR1 = {
           'JobDetail' => {
                          'PostingDate' => '1/30/2006',
                          'Location' => 'British Columbia',
                          'Url' =>
'http://www.wehire.ca/view.php?job_id=1408',
                          'Category' => 'Construction',
                          'Company' => 'XS West Construction Group',
                          'Title' => 'Equipment Operator'
                        }
         };
###

There are occasions when the wsdl file is not available which I can fake by
changing the wsdl URI to something silly like:

###
use strict;
use warnings;
use SOAP::Lite;
use Data::Dumper;
my $service =
SOAP::Lite->service('http://ws.cisa.xx/WehireWS/JobsWs.asmx?WSDL');
my $result = $service->GetAll;
print Dumper($result);
###

Now I get the output:

###
Service description 'http://ws.cisa.xx/WehireWS/JobsWs.asmx?WSDL' can't be
loade
d: 500 Can't connect to ws.cisa.xx:80 (Bad hostname 'ws.cisa.xx')
###

The thing is in my real app I want to handle this scenario without it
spitting out the error - eg to retry it a few times then if it still doesn't
work perform my own error handling.

Is there a 'best practice' for doing this? I'm a bit unsure of where to
start in terms of catching this and I want to make sure I have every
eventuality covered not just my faked bad hostname.

I guess I also need to do this for the method calls.

I had a look at the cookbook but couldn't find anything...

Cheers
Mark

#6120 From: "Brian" <pheighus@...>
Date: Fri Mar 28, 2008 3:26 pm
Subject: Re: re:Question about complex types
pheighus
Send Email Send Email
 
I am having the same problem (now four years after Mr. Sedgley).
does anyone know how to remove the encodingStyle attribute from the
envelope or an alternative solution?  I am not sure but I think the
server is running .NET.  I am using SOAP::Lite 0.69 on Windows XP.  I
also tried using version 0.71 on Ubuntu with no success.

Here is the actual fault string:

cvc-complex-type.3.2.2: Attribute 'soap:encodingStyle' is not allowed
to appear in element 'soap:Envelope'.

Here is the perl code:

use warnings;
use SOAP::Lite;

my $obj = SOAP::Lite->service('https://<url>.wsdl');

my $result = $obj->servicemethodcall('data');

my $som = $obj->call;

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

Brian (not Sedgley)

--- In soaplite@yahoogroups.com, Brian Sedgley <bsedgley@...> wrote:
>
> No it is complaining about the fact that the Message is being sent.
  I do not have control of the soap server and i think it is running
sax2 . I would agree that it would be nice if it ignored the message
according to the version of Schema they are using
http://www.w3.org/2001/06/soap-envelope and  look under complex type
"encodingStyle"   is not included as a valid selection as part of the
env.(maybe I am reading it wrong)  also ran it through XMLspy and it
also complained about the fact that "encodingStyle"  is in the envlope
  for a complex type. here is the response that is given in raw xml form.
>
> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="SOAP-ENV:Clientcvc-complex-type.3.2.2'
target=_blank>http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP\
-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>cvc\
-complex-type.3.2.2:
Attribute 'SOAP-ENV:encodingStyle' is not allowed to appear in element
'SOAP-ENV:Envelope'.</faultstring><detail><axl:Error
xmlns:axl="5001cvc-complex-type.3.2.2'
target=_blank>http://www.cisco.com/AXL/1.0"><axl:code>5001</axl:code><axl:messag\
e>cvc-complex-type.3.2.2:
Attribute 'SOAP-ENV:encodingStyle' is not allowed to appear in element
'SOAP-ENV:Envelope'.</axl:message></axl:Error></detail></SOAP-ENV:Fault></SOAP-E\
NV:Body></SOAP-ENV:Envelope>
>
> But the long and short of it is I need to make this work and I can't
change the server side.
>
> Please let me know if there is a solution
>
> Thanks
>
> Brian
>
>
> Byrne Reese <byrne@...> wrote:
> Not currently.
>
> I am surprised that your SOAP client is complaining, as it is a
> perfectly legitimate attribute to have in a SOAP message. What client
> are you using?
>
> Are you sure it is complaining about the element's presence in the
> message, or its value?
>
> Brian Sedgley wrote:
>
> > I have went searched the mailer for the solution for this problem I
> > have seen other people ask this question but have not seen the answer.
> >  The request I am makeing is of a complex type. When ever I get a
soap
> > fault it always complains about the 'SOAP-ENV:encodingStyle' being in
> > the soap message.   Complex type messages should not enclude encoding
> > style at least according to the schema I am working with.  is
there an
> > easy way to get rid of encoding style?
> >  thanks
> > Brian
> >
> >
> > use SOAP::Lite;
> > use XML::Simple;
> > use Data::Dumper;
> > $result = SOAP::Lite ->new() -> outputxml(1)
> >    -> uri('http<servername>/PerlScripts/axl/axlsoap.xsd')
> >    -> proxy('https://XXXX:XXXXX@<servername>8443/axl/listener')
> >    -> getPhone(SOAP::Data->name('phoneName' => "SEP00070ef73adf"));
> >
> >
> > my $config = XMLin($result,KeyAttr =>'');
> > print Dumper($return{'SOAP-ENV:Body'}->{ 'axl:getPhoneResponse'
> > }->{'return'});
>
>
>
> Yahoo! Groups Sponsor
> Get unlimited calls to
>
> U.S./Canada
>
>
> ---------------------------------
> Yahoo! Groups Links
>
>    To visit your group on the web, go to:
> http://groups.yahoo.com/group/soaplite/
>
>    To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> The HTML graphics in this message have been displayed. [Edit
Preferences - What's This?]
>

#6121 From: Peter Hartmann <phartman@...>
Date: Fri Mar 28, 2008 4:30 pm
Subject: Re: Re: re:Question about complex types
huberhans90
Send Email Send Email
 
Hello Brian,

Brian wrote:
> I am having the same problem (now four years after Mr. Sedgley).
> does anyone know how to remove the encodingStyle attribute from the
> envelope or an alternative solution?

you can do that by setting the encodingStyle to an empty string, like this:

---
my $obj = SOAP::Lite->service('http://<url>.wsdl');
$obj->encodingStyle('');
my $result = ...
---


Peter



   I am not sure but I think the
> server is running .NET.  I am using SOAP::Lite 0.69 on Windows XP.  I
> also tried using version 0.71 on Ubuntu with no success.
>
> Here is the actual fault string:
>
> cvc-complex-type.3.2.2: Attribute 'soap:encodingStyle' is not allowed
> to appear in element 'soap:Envelope'.
>
> Here is the perl code:
>
> use warnings;
> use SOAP::Lite;
>
> my $obj = SOAP::Lite->service('https://<url>.wsdl');
>
> my $result = $obj->servicemethodcall('data');
>
> my $som = $obj->call;
>
> if ($som->fault) {
>  print $som->fault->{'faultstring'};
> } else {
>  print $result;
> }
>
> Brian (not Sedgley)
>
> --- In soaplite@yahoogroups.com, Brian Sedgley <bsedgley@...> wrote:
>> No it is complaining about the fact that the Message is being sent.
>  I do not have control of the soap server and i think it is running
> sax2 . I would agree that it would be nice if it ignored the message
> according to the version of Schema they are using
> http://www.w3.org/2001/06/soap-envelope and  look under complex type
> "encodingStyle"   is not included as a valid selection as part of the
> env.(maybe I am reading it wrong)  also ran it through XMLspy and it
> also complained about the fact that "encodingStyle"  is in the envlope
>  for a complex type. here is the response that is given in raw xml form.
>> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="SOAP-ENV:Clientcvc-complex-type.3.2.2'
>
target=_blank>http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP\
-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>cvc\
-complex-type.3.2.2:
> Attribute 'SOAP-ENV:encodingStyle' is not allowed to appear in element
> 'SOAP-ENV:Envelope'.</faultstring><detail><axl:Error
> xmlns:axl="5001cvc-complex-type.3.2.2'
>
target=_blank>http://www.cisco.com/AXL/1.0"><axl:code>5001</axl:code><axl:messag\
e>cvc-complex-type.3.2.2:
> Attribute 'SOAP-ENV:encodingStyle' is not allowed to appear in element
>
'SOAP-ENV:Envelope'.</axl:message></axl:Error></detail></SOAP-ENV:Fault></SOAP-E\
NV:Body></SOAP-ENV:Envelope>
>> But the long and short of it is I need to make this work and I can't
> change the server side.
>> Please let me know if there is a solution
>>
>> Thanks
>>
>> Brian
>>
>>
>> Byrne Reese <byrne@...> wrote:
>> Not currently.
>>
>> I am surprised that your SOAP client is complaining, as it is a
>> perfectly legitimate attribute to have in a SOAP message. What client
>> are you using?
>>
>> Are you sure it is complaining about the element's presence in the
>> message, or its value?
>>
>> Brian Sedgley wrote:
>>
>>> I have went searched the mailer for the solution for this problem I
>>> have seen other people ask this question but have not seen the answer.
>>>  The request I am makeing is of a complex type. When ever I get a
> soap
>>> fault it always complains about the 'SOAP-ENV:encodingStyle' being in
>>> the soap message.   Complex type messages should not enclude encoding
>>> style at least according to the schema I am working with.  is
> there an
>>> easy way to get rid of encoding style?
>>>  thanks
>>> Brian
>>>
>>>
>>> use SOAP::Lite;
>>> use XML::Simple;
>>> use Data::Dumper;
>>> $result = SOAP::Lite ->new() -> outputxml(1)
>>>    -> uri('http<servername>/PerlScripts/axl/axlsoap.xsd')
>>>    -> proxy('https://XXXX:XXXXX@<servername>8443/axl/listener')
>>>    -> getPhone(SOAP::Data->name('phoneName' => "SEP00070ef73adf"));
>>>
>>>
>>> my $config = XMLin($result,KeyAttr =>'');
>>> print Dumper($return{'SOAP-ENV:Body'}->{ 'axl:getPhoneResponse'
>>> }->{'return'});
>>
>>
>> Yahoo! Groups Sponsor
>> Get unlimited calls to
>>
>> U.S./Canada
>>
>>
>> ---------------------------------
>> Yahoo! Groups Links
>>
>>    To visit your group on the web, go to:
>> http://groups.yahoo.com/group/soaplite/
>>
>>    To unsubscribe from this group, send an email to:
>> soaplite-unsubscribe@yahoogroups.com
>>
>>    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>
>>
>>
>> The HTML graphics in this message have been displayed. [Edit
> Preferences - What's This?]
>
>
>

#6122 From: "Patrick" <pat.mariani@...>
Date: Fri Mar 28, 2008 8:39 pm
Subject: Classic Upgrade issue
w8itout
Send Email Send Email
 

Hi All - My apologies for a huge post, esp 1st time out - i've been using SOAP::Lite for a year, and have been able to figure things out, but.....oh, please don't try to call the yellowpages service.....it isn't in a public place yet.

We are changing platforms to solaris 10 and of course they want the latest and greatest tool versions installed - we started with perl 5.8.7 with SOAP::Lite .60, loading from a wsdl, i get a working request that looks like....


SOAP::Transport::HTTP::Client::send_receive: POST http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2 HTTP/1.1
Accept: text/xml
Accept: multipart/*
Content-Length: 936
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="
http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
  <SOAP-ENV:Body
  >
    <namesp1:findListingsWithPhone xmlns:namesp1="
http://integration.yellowpages.com"
    >
      <phone xsi:type="xsd:string"
      >2126455474</phone>
      <profileId xsi:type="xsd:string"/>
      <pageNumber xsi:type="xsd:int"
      >1</pageNumber>
      <pageSize xsi:type="xsd:int"
      >1</pageSize>
      <partnerId xsi:type="xsd:string"
      >ABC123</partnerId>
      <userId xsi:type="xsd:string"/>
      <transactionId xsi:type="xsd:string" xsi:null="1"/>
      <sort xsi:type="xsd:string"/></namesp1:findListingsWithPhone></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close

With Perl 5.8.8 (or 5.10) and SOAP::Lite .71 the request that generates a fault...it looks like


SOAP::Transport::HTTP::Client::send_receive: POST http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2 HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 1085
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
    xmlns:tns2="
http://data2.integration.yellowpages.com"
    xmlns:apachesoap="
http://xml.apache.org/xml-soap"
    soap:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
    xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
    xmlns:tns="
http://integration.yellowpages.com">
  <soap:Body>
    <tns:findListingsWithPhone>
      <phone xsi:type="xsd:string">2126455474</phone>

      <profileId xsi:type="xsd:string" />

      <pageNumber xsi:type="xsd:int">1</pageNumber>

      <pageSize xsi:type="xsd:int">1</pageSize>

      <partnerId xsi:type="xsd:string">ABC123</partnerId>

      <userId xsi:type="xsd:string" />

      <transactionId xsi:type="xsd:string" />

      <sort xsi:type="xsd:string" />
          </tns:findListingsWithPhone>
  </soap:Body>
</soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Connection: close
Date: Fri, 28 Mar 2008 20:13:21 GMT
Server: nginx/0.5.35
Content-Type: text/xml;charset=utf-8
Client-Date: Fri, 28 Mar 2008 20:12:00 GMT
Client-Peer: 216.173.231.85:8080
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
  <soapenv:Upgrade soapenv:actor="
http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
   <soapenv:SupportedEnvelope qname="soapenv:Envelope"/>
  </soapenv:Upgrade>
 </soapenv:Header>
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:VersionMismatch</faultcode>
   <faultstring>Version Mismatch</faultstring>
   <detail>
    <ns1:hostname xmlns:ns1="
http://xml.apache.org/axis/">dalxmlsandbox1.flight.yellowpages.com</ns1:hostname>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>

I'm a bit worried about the 'soapenc' and 'encodingstyle' pointing to the same place - and also the /wsdl/soap, rather than /soap/envelope/ - but the version mismatch error has me thrown for a loop -

here is the top of the wsdl

<wsdl:definitions name="IntegrationAPI2" targetNamespace="http://integration.yellowpages.com" xmlns:apachesoap="http://x
ml.apache.org/xml-soap" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soa
p/encoding/" xmlns:tns="http://integration.yellowpages.com" xmlns:tns2="http://data2.integration.yellowpages.com" xmlns:
wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

I'd rather edit the wsdl, than hack the code if possible.....it is so nice and tight the way it is!

many thanks

pat

 


#6123 From: Martin Kutter <martin.kutter@...>
Date: Fri Mar 28, 2008 9:43 pm
Subject: Re: Classic Upgrade issue
kutterma
Send Email Send Email
 
Hi Patrick,

this is due to an error in SOAP::Lite's namespace handling - it uses
soap: as envelope prefix and does not recognize it is already taken.

The easiest workaround is to add the following line to your code
(somewhere at start):

$SOAP::Constants::PREFIX_ENV = 'SOAP-ENV';

This makes SOAP::Lite use SOAP-ENV as envelope prefix again and avoids
the namespace clash.

Martin

Am Freitag, den 28.03.2008, 20:39 +0000 schrieb Patrick:
> Hi All - My apologies for a huge post, esp 1st time out - i've been
> using SOAP::Lite for a year, and have been able to figure things out,
> but.....oh, please don't try to call the yellowpages service.....it
> isn't in a public place yet.
>
> We are changing platforms to solaris 10 and of course they want the
> latest and greatest tool versions installed - we started with perl
> 5.8.7 with SOAP::Lite .60, loading from a wsdl, i get a working
> request that looks like....
>
>
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2
HTTP/1.1
> Accept: text/xml
> Accept: multipart/*
> Content-Length: 936
> Content-Type: text/xml; charset=utf-8
> SOAPAction: ""
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >
>   <SOAP-ENV:Body
>   >
>     <namesp1:findListingsWithPhone
> xmlns:namesp1="http://integration.yellowpages.com"
>     >
>       <phone xsi:type="xsd:string"
>       >2126455474</phone>
>       <profileId xsi:type="xsd:string"/>
>       <pageNumber xsi:type="xsd:int"
>       >1</pageNumber>
>       <pageSize xsi:type="xsd:int"
>       >1</pageSize>
>       <partnerId xsi:type="xsd:string"
>       >ABC123</partnerId>
>       <userId xsi:type="xsd:strin g"/>
>       <transactionId xsi:type="xsd:string" xsi:null="1"/>
>       <sort
>
xsi:type="xsd:string"/></namesp1:findListingsWithPhone></SOAP-ENV:Body></SOAP-EN\
V:Envelope>
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
> Connection: close
>
>
> With Perl 5.8.8 (or 5.10) and SOAP::Lite .71 the request that
> generates a fault...it looks like
>
>
> SOAP::Transport::HTTP::Client::send_receive: POST
> http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2
HTTP/1.1
> Accept: text/xml
> Accept: multipart/*
> Accept: application/soap
> Content-Length: 1085
> Content-Type: text/xml; charset=utf-8
> SOAPAction: ""
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope
>     xmlns:tns2="http://data2.integration.yellowpages.com"
>     xmlns:apachesoap="http://xml.apache.org/xml-soap"
>     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:tns="http://integration.yellowpages.com">
>   <soap:Body>
>     <tns:findListingsWithPhone>
>      ! ; <ph one xsi:type="xsd:string">2126455474</phone>
>
>       <profileId xsi:type="xsd:string" />
>
>       <pageNumber xsi:type="xsd:int">1</pageNumber>
>
>       <pageSize xsi:type="xsd:int">1</pageSize>
>
>       <partnerId xsi:type="xsd:string">ABC123</partnerId>
>
>       <userId xsi:type="xsd:string" />
>
>       <transactionId xsi:type="xsd:string" />
>
>       <sort xsi:type="xsd:string" />
>           </tns:findListingsWithPhone>
>   </soap:Body>
> </soap:Envelope>
> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
> Server Error
> Connection: close
> Date: Fri, 28 Mar 2008 20:13:21 GMT
> Server: nginx/0.5.35
> Content-Type: text/xml;charset=utf-8
> Client-Date: Fri, 28 Mar 2008 20:12:00 GMT
> Client-Peer: 216.173.231.85:8080
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
>
> <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Header>
>   <soapenv:Upgrade
> soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
> soapenv:mustUnderstand="0">
>    <soapenv:SupportedEnvelope qname="soapenv:Envelope"/>
>   </soapenv:Upgrade>
>  </soapenv:Header>
>  <soapenv:Body>
>   <soapenv:Fault>
>    <faultcode>soapenv:VersionMismatch</faultcode>
>    <faultstring>Version Mismatch</faultstring>
>    <detail>
>     <ns1:hostname
>
xmlns:ns1="http://xml.apache.org/axis/">dalxmlsandbox1.flight.yellowpages.com</n\
s1:hostname>
>    </detail>
>   </soapenv:Fault>
>  </soapenv:Body>
> </soapenv:Envelope>
>
>
> I'm a bit worried about the 'soapenc' and 'encodingstyle' pointing to
> the same place - and also the /wsdl/soap, rather than /soap/envelope/
> - but the version mismatch error has me thrown for a loop -
>
> here is the top of the wsdl
>
> <wsdl:definitions name="IntegrationAPI2"
> targetNamespace="http://integration.yellowpages.com"
> xmlns:apachesoap="http://x
> ml.apache.org/xml-soap"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soa
> p/encoding/" xmlns:tns="http://integration.yellowpages.com"
> xmlns:tns2="http://data2.integration.yellowpages.com" xmlns:
> wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>
> I'd rather edit the wsdl, than hack the code if possible.....it is so
> nice and tight the way it is!
>
> many thanks
>
> pat
>
>
>
>
>

#6124 From: "patrick mariani" <pat.mariani@...>
Date: Fri Mar 28, 2008 11:05 pm
Subject: Re: Classic Upgrade issue
w8itout
Send Email Send Email
 
Vielen Danke!

Worked w/o a hitch.....

Pat

For Completeness - here it is

<SOAP-ENV:Envelope
     xmlns:tns2="http://data2.integration.yellowpages.com"
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:apachesoap="http://xml.apache.org/xml-soap"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:tns="http://integration.yellowpages.com"
     SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
     <tns:findListingsWithPhone>
       <phone xsi:type="xsd:string">2126455474</phone>

       <profileId xsi:type="xsd:string" />

       <pageNumber xsi:type="xsd:int">1</pageNumber>

       <pageSize xsi:type="xsd:int">1</pageSize>

       <partnerId xsi:type="xsd:string">ABC123</partnerId>

       <userId xsi:type="xsd:string" />

       <transactionId xsi:type="xsd:string" />

       <sort xsi:type="xsd:string" />
           </tns:findListingsWithPhone>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close




----- Original Message -----
From: "Martin Kutter" <martin.kutter@...>
To: "Patrick" <pat.mariani@...>
Cc: <soaplite@yahoogroups.com>
Sent: Friday, March 28, 2008 5:43 PM
Subject: Re: [soaplite] Classic Upgrade issue


> Hi Patrick,
>
> this is due to an error in SOAP::Lite's namespace handling - it uses
> soap: as envelope prefix and does not recognize it is already taken.
>
> The easiest workaround is to add the following line to your code
> (somewhere at start):
>
> $SOAP::Constants::PREFIX_ENV = 'SOAP-ENV';
>
> This makes SOAP::Lite use SOAP-ENV as envelope prefix again and avoids
> the namespace clash.
>
> Martin
>
> Am Freitag, den 28.03.2008, 20:39 +0000 schrieb Patrick:
>> Hi All - My apologies for a huge post, esp 1st time out - i've been
>> using SOAP::Lite for a year, and have been able to figure things out,
>> but.....oh, please don't try to call the yellowpages service.....it
>> isn't in a public place yet.
>>
>> We are changing platforms to solaris 10 and of course they want the
>> latest and greatest tool versions installed - we started with perl
>> 5.8.7 with SOAP::Lite .60, loading from a wsdl, i get a working
>> request that looks like....
>>
>>
>> SOAP::Transport::HTTP::Client::send_receive: POST
>> http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2
>> HTTP/1.1
>> Accept: text/xml
>> Accept: multipart/*
>> Content-Length: 936
>> Content-Type: text/xml; charset=utf-8
>> SOAPAction: ""
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <SOAP-ENV:Envelope
>> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >
>>   <SOAP-ENV:Body
>>   >
>>     <namesp1:findListingsWithPhone
>> xmlns:namesp1="http://integration.yellowpages.com"
>>     >
>>       <phone xsi:type="xsd:string"
>>       >2126455474</phone>
>>       <profileId xsi:type="xsd:string"/>
>>       <pageNumber xsi:type="xsd:int"
>>       >1</pageNumber>
>>       <pageSize xsi:type="xsd:int"
>>       >1</pageSize>
>>       <partnerId xsi:type="xsd:string"
>>       >ABC123</partnerId>
>>       <userId xsi:type="xsd:strin g"/>
>>       <transactionId xsi:type="xsd:string" xsi:null="1"/>
>>       <sort
>>
xsi:type="xsd:string"/></namesp1:findListingsWithPhone></SOAP-ENV:Body></SOAP-EN\
V:Envelope>
>> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
>> Connection: close
>>
>>
>> With Perl 5.8.8 (or 5.10) and SOAP::Lite .71 the request that
>> generates a fault...it looks like
>>
>>
>> SOAP::Transport::HTTP::Client::send_receive: POST
>> http://sandbox.yellowpages.com:8080/yellowpages/services/IntegrationAPI2
>> HTTP/1.1
>> Accept: text/xml
>> Accept: multipart/*
>> Accept: application/soap
>> Content-Length: 1085
>> Content-Type: text/xml; charset=utf-8
>> SOAPAction: ""
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <soap:Envelope
>>     xmlns:tns2="http://data2.integration.yellowpages.com"
>>     xmlns:apachesoap="http://xml.apache.org/xml-soap"
>>     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>     xmlns:tns="http://integration.yellowpages.com">
>>   <soap:Body>
>>     <tns:findListingsWithPhone>
>>      ! ; <ph one xsi:type="xsd:string">2126455474</phone>
>>
>>       <profileId xsi:type="xsd:string" />
>>
>>       <pageNumber xsi:type="xsd:int">1</pageNumber>
>>
>>       <pageSize xsi:type="xsd:int">1</pageSize>
>>
>>       <partnerId xsi:type="xsd:string">ABC123</partnerId>
>>
>>       <userId xsi:type="xsd:string" />
>>
>>       <transactionId xsi:type="xsd:string" />
>>
>>       <sort xsi:type="xsd:string" />
>>           </tns:findListingsWithPhone>
>>   </soap:Body>
>> </soap:Envelope>
>> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
>> Server Error
>> Connection: close
>> Date: Fri, 28 Mar 2008 20:13:21 GMT
>> Server: nginx/0.5.35
>> Content-Type: text/xml;charset=utf-8
>> Client-Date: Fri, 28 Mar 2008 20:12:00 GMT
>> Client-Peer: 216.173.231.85:8080
>> Client-Response-Num: 1
>> Client-Transfer-Encoding: chunked
>>
>> <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>  <soapenv:Header>
>>   <soapenv:Upgrade
>> soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>> soapenv:mustUnderstand="0">
>>    <soapenv:SupportedEnvelope qname="soapenv:Envelope"/>
>>   </soapenv:Upgrade>
>>  </soapenv:Header>
>>  <soapenv:Body>
>>   <soapenv:Fault>
>>    <faultcode>soapenv:VersionMismatch</faultcode>
>>    <faultstring>Version Mismatch</faultstring>
>>    <detail>
>>     <ns1:hostname
>>
xmlns:ns1="http://xml.apache.org/axis/">dalxmlsandbox1.flight.yellowpages.com</n\
s1:hostname>
>>    </detail>
>>   </soapenv:Fault>
>>  </soapenv:Body>
>> </soapenv:Envelope>
>>
>>
>> I'm a bit worried about the 'soapenc' and 'encodingstyle' pointing to
>> the same place - and also the /wsdl/soap, rather than /soap/envelope/
>> - but the version mismatch error has me thrown for a loop -
>>
>> here is the top of the wsdl
>>
>> <wsdl:definitions name="IntegrationAPI2"
>> targetNamespace="http://integration.yellowpages.com"
>> xmlns:apachesoap="http://x
>> ml.apache.org/xml-soap"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:soapenc="http://schemas.xmlsoap.org/soa
>> p/encoding/" xmlns:tns="http://integration.yellowpages.com"
>> xmlns:tns2="http://data2.integration.yellowpages.com" xmlns:
>> wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>
>>
>> I'd rather edit the wsdl, than hack the code if possible.....it is so
>> nice and tight the way it is!
>>
>> many thanks
>>
>> pat
>>
>>
>>
>>
>>
>

#6125 From: Hugues de Mazancourt <hugues@...>
Date: Mon Mar 31, 2008 7:17 am
Subject: SOAP::Lite closing connection to .Net client
hdemazancourt
Send Email Send Email
 
Hi all,

I'm using SOAP::Lite for years to integrate a perl Search Engine
through Web Service into other environments (Java, COM, etc.). The
server is resides in a mod_perl http server, running under Linux (RHEL)

Right now, I have a customer complaining about requests failing when
the message is too long. The integration is done with a .NET client
(using SoapHttpClient).
Stack traces show the following message:

System.Net Error: 0 : [4696] Exception in the
HttpWebRequest#38338487:: - The underlying connection was closed: An
unexpected error occurred on a receive.

The analysis my client makes is that the client receives all data but
but the connection is closed (by SOAP::Lite server) before reading the
last XML element (the last element of a SOAP message). As far as I
understand, .Net assumes that it's the client responsibility to close
the connection, not the server's, which is apparently happening. But I
really don't know how to keep the connection open by the server when
the message is finished.

Anyone heard of such interoperability problem with .Net ?

Best,


Hugues de Mazancourt
Lingway (www.lingway.com)

#6126 From: "Patrick" <pat.mariani@...>
Date: Mon Mar 31, 2008 5:01 pm
Subject: Matching on Attributes
w8itout
Send Email Send Email
 

OK - I've now been whipped twice in three days.  Seems the server i'm accessing doesn't like to use XML for its real power - it returns an array whose attribute must be matched, then followed into the value element (i'm amazed there isn't an attribute for the value here)

Anyway - pls check out the last couple lines of code, how do i get the "Value" element of the "Property" array where "Property" has attribute "NAME" = "name"

I know how to do it in 3 or 4 lines by looping and matching...but it would seem that the XPATH derivative might work(?).
I've tested a couple different permutations (backets/curlys/etc..)

Many thanks again (i don't control the server!)

Pat

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

use SOAP::Lite;

$XML = <<EXML;
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:
xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:findListingsWithPhoneResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http:/
/integration.yellowpages.com">
   <findListingsWithPhoneReturn xsi:type="ns2:SearchResult" xmlns:ns2="
http://data2.integration.yellowpages.com">
    <Categories soapenc:arrayType="ns2:Category[0]" xsi:type="soapenc:Array" xmlns:soapenc="
http://schemas.xmlsoap.org/s
oap/encoding/"/>
    <Listings soapenc:arrayType="ns2:Listing[1]" xsi:type="soapenc:Array" xmlns:soapenc="
http://schemas.xmlsoap.org/soap
/encoding/">
     <Listing xsi:type="ns2:Listing">
      <Properties soapenc:arrayType="ns2:Property[13]" xsi:type="soapenc:Array">
       <Property Name="name" xsi:type="ns2:Property">
        <Value xsi:type="xsd:string">Sirius Satellite Datacenter</Value>
       </Property>
       <Property Name="address" xsi:type="ns2:Property">
        <Value xsi:type="xsd:string">601 W 26th St</Value>
       </Property>
       <Property Name="city" xsi:type="ns2:Property">
        <Value xsi:type="xsd:string">New York</Value>
       </Property>
       <Property Name="state" xsi:type="ns2:Property">
        <Value xsi:type="xsd:string">NY</Value>
       </Property>
       <Property Name="zip" xsi:type="ns2:Property">
        <Value xsi:type="xsd:string">10001</Value>
       </Property>
      </Properties>
     </Listing>
    </Listings>
   </findListingsWithPhoneReturn>
  </ns1:findListingsWithPhoneResponse>
 </soapenv:Body>
</soapenv:Envelope>
EXML

my $som = SOAP::Deserializer->deserialize($XML);

#/* Loop just to test access - HELP HERE!!! */
for my $a ($som->valueof(
'//findListingsWithPhoneReturn/Listings/Listing/Properties/Property[@Name="name"]/Value'
)) {
    print $a . "\n";
}


#6127 From: "bshenanigan" <bshenanigan@...>
Date: Tue Apr 1, 2008 7:47 pm
Subject: Problem with bareword error
bshenanigan
Send Email Send Email
 
I am just starting using SOAP::Lite and I am having a bit of a problem
getting anything to work.  I have a very simple perl file (below)
which is giving me errors before I even do anything:

------

#!/usr/local/bin/perl

use strict;
use warnings;

use SOAP::Lite;

print SOAP::Lite
-> service("file:./OmnitureAdminServices.wsdl");

-----

Gives:

-----

Bad stub: Bareword "ReportSuite" not allowed while "strict subs" in
use at (eval
  93) line 6.
Bareword "ReportSuite" not allowed while "strict subs" in use at (eval
93) line
6.
Bareword "ReportSuite" not allowed while "strict subs" in use at (eval
93) line
6.
Bareword "ReportSuite" not allowed while "strict subs" in use at (eval
93) line
6.
Bareword "ReportSuite" not allowed while "strict subs" in use at (eval
93) line
6.
Bareword "ReportSuite" not allowed while "strict subs" in use at (eval
93) line
6.
Bareword "Permissions" not allowed while "strict subs" in use at (eval
93) line
6.
Bareword "Company" not allowed while "strict subs" in use at (eval 93)
line 6.
Bareword "Company" not allowed while "strict subs" in use at (eval 93)
line 6.
Bareword "DeliveryList" not allowed while "strict subs" in use at
(eval 93) line
  6.
  ...

-----

Some of the names in the WSDL are similar to the 'barewords' - like:
<operation name="DeliveryList.Save">
and
<operation name="ReportSuite.AddCorrelations">

Could it be that the '.' in the names is causing a problem?

I am using perl 5.8.7


Any help appreciated

#6128 From: "Patrick" <pat.mariani@...>
Date: Wed Apr 2, 2008 1:31 pm
Subject: Re: Matching on Attributes
w8itout
Send Email Send Email
 
I decided to return xml from the soap call, and then used XPath
directly - seemed the prudent thing to do

Messages 6099 - 6128 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