|
Posted by peilin.wu on April 28, 2006, 7:35 pm
Please log in for more thread options
I am new to this module and unsure how to call the remote method.
However, when it fails to parse the soap request and I don't know why
it happened.
Any helps are much appreciated!
Error parsing the incoming request
Linked cause: The processing instruction target matching
"[xX][mM][lL]" is not allowed.</
The wsdl looks like this
<w:operation name="myGetUserById">
<soap:operation style="document"/>
<w:input>
<soap:body use="literal"/>
</w:input>
<w:output>
<soap:body use="literal"/>
</w:output>
</w:operation>
<w:message name="myGetUserByIdRequest">
<w:part name="myGetUserByIdInput" element="getRequest"/>
</w:message>
------------------------------Below is the code
use SOAP::Lite +trace;
my $soap =
SOAP::Lite->uri('$myTargetNamespace')->proxy('$myProxyServer');
my $loginElement = SOAP::Data->name('login')->value('myid');
my $pwdElement = SOAP::Data->name('password')->value('mypwd!');
my $domainElement = SOAP::Data->name('companyDomain')->value('mycom');
my $authenticationElementType =
SOAP::Data->value($loginElement,$pwdElement,$domainElement);
my $authenticationElement = SOAP::Data->name
('authentication')->value($authenticationElementType);
my $uniqueIDElement = SOAP::Data->name('uniqueID')->value('myemail');
my @params = ($authenticationElement, $uniqueIDElement);
print $result=$soap->call('myGetUserById' =>
SOAP::Data->name('myGetUserByIdRequest')
->type('userProfileRequestType')
->value([@params])
);
The output is as following:
1SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
SOAP::Transport::HTTP::Client::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: myGetUserById SOAP::Data=HASH(0x1a60cf0)
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Request=HASH(0x1bc4258)
SOAP::Transport::HTTP::Client::send_receive: POST $myProxyServer
Accept: text/xml
Accept: multipart/*
Content-Length: 895
Content-Type: text/xml; charset=utf-8
SOAPAction: "$myTargetNamespace#myGetUserById"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:namesp2="http://namespaces.soaplite.com/perl" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body><namesp1:myGetUserById
xmlns:namesp1="$myTargetNamespace">
<myGetUserByIdRequest xsi:type="namesp2:userProfileRequestType"
SOAP-ENC:arrayType="xsd:string[4]">
<login xsi:type="xsd:string">myid</login>
<password xsi:type="xsd:string">mypwd</password>
<companyDomain xsi:type="xsd:string">mycom</companyDomain>
<uniqueID
xsi:type="xsd:string">myemail</uniqueID></myGetUserByIdRequest>
</namesp1:myGetUserById></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Response=HASH(0x1d6f248)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Date: Fri, 28 Apr 2006 21:14:24 GMT
Server: Apache-Coyote/1.1
Content-Length: 384
Content-Type: text/xml;charset=utf-8
Client-Date: Fri, 28 Apr 2006 21:14:24 GMT
Client-Peer: 10.5.11.72:7052
Client-Response-Num: 1
SOAPAction: ""
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault>
<faultcode>SOAP-ENV:UserProfileWebService</faultcode>
<faultstring>Error parsing the incoming request
Linked cause: The processing instruction target matching
"[xX][mM][lL]" is not allowed.</faultstring>
</SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()
SOAP::Lite::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::SOM::DESTROY: ()
|