logo       

Nusoap and complexTypes: msg#00115

php.nusoap.general

Subject: Nusoap and complexTypes

Does NuSoap support complexTypes yet?

Thanks.

-----Original Message-----
From: nusoap-general-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:nusoap-general-admin@xxxxxxxxxxxxxxxxxxxxx]On Behalf Of Scott
Nichol
Sent: 04 May 2004 10:04
To: nusoap-general@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Nusoap-general] problems with wsdl and function call


NuSOAP does not yet support extensions of complexTypes. With
QuickOrderRequest is defined as below, NuSOAP only recognizes the single
element being added to the Pin1Request type.

<s:complexType name="QuickOrderRequest">
<s:complexContent>
<s:extension base="ord:Pin1Request">
<s:sequence>
<s:element name="ApproverEmail" type="s:string"
minOccurs="0"/>
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType>

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Bob Descampa" <bobdescampa@xxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, May 04, 2004 2:45 PM
Subject: [Nusoap-general] problems with wsdl and function call


Hi,

After lots of success with NuSoap, I've been stumped
for a few days on a specific function call. The
problem is that the array I use to pass along isn't
creating the XML I intend it to. Here is an excerpt
of my code:

$wdsl_order =
'https://prodapi.geotrust.com/webtrust/order.jws?WSDL';
$soap_client = new soapclient($wdsl_order, TRUE);
$soap_proxy = $soap_client->getProxy();
$arr_result = $soap_proxy->QuickOrder($params);

print '<pre>' . htmlspecialchars($soap_proxy->request,
ENT_QUOTES) . '</pre>';
print '<pre>' .
htmlspecialchars($soap_proxy->debug_str, ENT_QUOTES) .
</pre>';
print '<pre>' .
htmlspecialchars($soap_proxy->response, ENT_QUOTES) .
'</pre>';

The $params array looks like:

Array
(
[Request] => Array
(
[OrderRequestHeader] => Array
(
[PartnerCode] => xxx
[ProductCode] => QUICKSSLPREMIUM
[AuthToken] => Array
(
[UserName] => xxx
[Password] => xxx
)

[ReplayToken] => none
[UseReplayToken] =>
)

[OrderParameters] => Array
(
[ValidityPeriod] => 12
[ServerCount] => 1
[CSR] => long csr here
[WebServerType] => Other
)

[AdminContact] => Array
(
[FirstName] => Admin
[LastName] => System
[Phone] => 555-555-5555
[Email] => blah@xxxxxxxxx
)

[TechContact] => Array
(
[FirstName] => Admin
[LastName] => System
[Phone] => 555-555-5555
[Email] => blah@xxxxxxxxx
)

[BillingContact] => Array
(
[FirstName] => Admin
[LastName] => System
[Phone] => 555-555-5555
[Email] => blah@xxxxxxxxx
)

[ApproverEmail] => blah@xxxxxxxxx
)

)

The output of the code looks like:

POST /webtrust/order.jws HTTP/1.0
User-Agent: NuSOAP/0.6.7 (1.2)
Host: prodapi.geotrust.com:443
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction:
"http://api.geotrust.com/webtrust/order/QuickOrder";
Content-Length: 537

<?xml version="1.0"
encoding="ISO-8859-1"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:si="http://soapinterop.org/xsd";
xmlns:nu="http://testuri.com";><SOAP-ENV:Body><QuickOrder
xmlns="http://api.geotrust.com/webtrust/order";><Request><ApproverEmail>blah@
blah.blah</ApproverEmail></Request></QuickOrder></SOAP-ENV:Body></SOAP-ENV:E
nvelope>
soap_proxy_1985762249: call: QuickOrder, Array,
http://testuri.com,
http://api.geotrust.com/webtrust/order/QuickOrder, ,
rpc, encoded; endpointType: wsdl
soap_proxy_1985762249: name -> QuickOrder
soap_proxy_1985762249: binding -> orderSoap
soap_proxy_1985762249: endpoint ->
https://prodapi.geotrust.com:443/webtrust/order.jws
soap_proxy_1985762249: soapAction ->
http://api.geotrust.com/webtrust/order/QuickOrder
soap_proxy_1985762249: style -> document
soap_proxy_1985762249: input -> Array
soap_proxy_1985762249: output -> Array
soap_proxy_1985762249: transport ->
http://schemas.xmlsoap.org/soap/http
soap_proxy_1985762249: documentation ->
soap_proxy_1985762249: serializing param array for
WSDL operation QuickOrder
soap_proxy_1985762249: wsdl debug:
wsdl: in serializeRPCParameters with operation
QuickOrder, direction input and 1 param(s), and xml
schema version http://www.w3.org/2001/XMLSchema
wsdl: array(9) {
["name"]=>
string(10) "QuickOrder"
["binding"]=>
string(9) "orderSoap"
["endpoint"]=>
string(51)
"https://prodapi.geotrust.com:443/webtrust/order.jws";
["soapAction"]=>
string(49)
"http://api.geotrust.com/webtrust/order/QuickOrder";
["style"]=>
string(8) "document"
["input"]=>
array(3) {
["use"]=>
string(7) "literal"
["message"]=>
string(16) "QuickOrderSoapIn"
["parts"]=>
array(1) {
["parameters"]=>
string(49)
"http://api.geotrust.com/webtrust/order:QuickOrder";
}
}
["output"]=>
array(3) {
["use"]=>
string(7) "literal"
["message"]=>
string(17) "QuickOrderSoapOut"
["parts"]=>
array(1) {
["parameters"]=>
string(57)
"http://api.geotrust.com/webtrust/order:QuickOrderResponse";
}
}
["transport"]=>
string(36) "http://schemas.xmlsoap.org/soap/http";
["documentation"]=>
string(0) ""
}

wsdl: use=literal
wsdl: got 1 part(s)
wsdl: have arraySimple parameters
wsdl: serializing part "parameters" of type
"http://api.geotrust.com/webtrust/order:QuickOrder";
wsdl: calling serializeType w/indexed param
wsdl: in serializeType: parameters,
http://api.geotrust.com/webtrust/order:QuickOrder,
Array, literal,
wsdl: got a prefixed type: QuickOrder,
http://api.geotrust.com/webtrust/order
xmlschema: <http://api.geotrust.com/webtrust/order> in
getTypeDef, found element QuickOrder
xmlschema: <http://api.geotrust.com/webtrust/order> in
getTypeDef, found complexType QuickOrder_ContainedType
wsdl: typedef, name: QuickOrder
wsdl: typedef, typeClass: element
wsdl: typedef, type:
http://api.geotrust.com/webtrust/order:QuickOrder_ContainedType
wsdl: typedef, form: qualified
wsdl: typedef, phpType: struct
wsdl: typedef, elements: Array
wsdl: serializeType: uqType: QuickOrder, ns:
http://api.geotrust.com/webtrust/order, phptype:
struct, arrayType:
wsdl: in serializeType: Request,
http://api.geotrust.com/webtrust/order:QuickOrderRequest,
Array, literal,
wsdl: got a prefixed type: QuickOrderRequest,
http://api.geotrust.com/webtrust/order
xmlschema: <http://api.geotrust.com/webtrust/order> in
getTypeDef, found complexType QuickOrderRequest
wsdl: typedef, name: QuickOrderRequest
wsdl: typedef, typeClass: complexType
wsdl: typedef, phpType: struct
wsdl: typedef, compositor: sequence
wsdl: typedef, elements: Array
wsdl: serializeType: uqType: QuickOrderRequest, ns:
http://api.geotrust.com/webtrust/order, phptype:
struct, arrayType:
wsdl: in serializeType: ApproverEmail,
http://www.w3.org/2001/XMLSchema:string,
blah@xxxxxxxxx, literal,
wsdl: got a prefixed type: string,
http://www.w3.org/2001/XMLSchema
wsdl: returning: string(67)
"<Request><ApproverEmail>blah@xxxxxxxxx</ApproverEmail></Request>"

wsdl: returning: string(139) "<QuickOrder
xmlns="http://api.geotrust.com/webtrust/order";><Request><ApproverEmail>blah@
blah.blah</ApproverEmail></Request></QuickOrder>"


soap_proxy_1985762249: endpoint:
https://prodapi.geotrust.com:443/webtrust/order.jws,
soapAction:
http://api.geotrust.com/webtrust/order/QuickOrder,
namespace: http://testuri.com, style: document, use:
literal
soap_proxy_1985762249: SOAP message length: 537
contents: <?xml version="1.0"
encoding="ISO-8859-1"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:si="http://soapinterop.org/xsd";
xmlns:nu="http://testuri.com";><SOAP-ENV:Body><QuickOrder
xmlns="http://api.geotrust.com/webtrust/order";><Request><ApproverEmail>blah@
blah.blah</ApproverEmail></Request></QuickOrder></SOAP-ENV:Body></SOAP-ENV:E
nvelope>
soap_proxy_1985762249: transporting via HTTP
soap_proxy_1985762249: sending message, length: 537
soap_proxy_1985762249: transport debug data...
soap_transport_http: scheme = https
soap_transport_http: host = prodapi.geotrust.com
soap_transport_http: port = 443
soap_transport_http: path = /webtrust/order.jws
soap_transport_http: entered send() with data of
length: 537
soap_transport_http: connect using https
soap_transport_http: cURL connection set up
soap_transport_http: set cURL payload
soap_transport_http: send and receive with cURL
soap_transport_http: No cURL error, closing cURL
soap_transport_http: found proper separation of
headers and document
soap_transport_http: cleaned data, stringlen: 627
soap_transport_http: end of send()

soap_proxy_1985762249: got response, length: 627 type:
text/xml; charset=UTF-8
soap_proxy_1985762249: Entering parseResponse() for
data of length 627 and type text/xml; charset=UTF-8
soap_proxy_1985762249: Got response encoding: UTF-8
soap_proxy_1985762249: Use encoding: UTF-8 when
creating soap_parser
soap_proxy_1985762249: soap_parser: Entering
soap_parser(), length=627, encoding=UTF-8
soap_parser: found root struct Fault, pos 2
soap_parser: inside buildVal() for detail(pos 5) of
type
soap_parser: inside buildVal() for Fault(pos 2) of
type struct
soap_parser: parsed successfully, found root struct: 2
of name Fault

soap_proxy_1985762249: sent message successfully and
got a(n) array back
soap_proxy_1985762249: got fault
soap_proxy_1985762249: faultcode = fc:JWSError<br>
soap_proxy_1985762249: faultstring =
null
<br>
soap_proxy_1985762249: detail = Array<br>

HTTP/1.1 500 Internal Server Error
Date: Tue, 04 May 2004 17:29:33 GMT
Pragma: no-cache
Server: WebLogic Server 8.1 SP1 Fri Jun 20 23:06:40
PDT 2003 271009 with
Content-Length: 627
Content-Type: text/xml; charset=UTF-8
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode
xmlns:fc='http://www.bea.com/2003/04/jwFaultCode/'>fc:JWSError</faultcode>
<faultstring>
null
</faultstring>
<detail>
<jwErr:jwErrorDetail
xmlns:jwErr='http://www.bea.com/2002/04/jwErrorDetail/'>
null
</jwErr:jwErrorDetail>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


So, you can see, the XML being send isn't what I
intend. I've tested with cURL and sending this works:

<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<SOAP-ENV:Body>
<QuickOrder
xmlns="http://api.geotrust.com/webtrust/order";>
<Request>
<OrderRequestHeader>
<PartnerCode>xxx</PartnerCode>
<ProductCode>QUICKSSLPREMIUM</ProductCode>
<AuthToken>
<UserName>xxx</UserName>
<Password>xxx</Password>
</AuthToken>
<ReplayToken>none</ReplayToken>
<UseReplayToken>false</UseReplayToken>
</OrderRequestHeader>
<OrderParameters>
<ValidityPeriod>12</ValidityPeriod>
<ServerCount>1</ServerCount>
<CSR>long CSR here</CSR>
<WebServerType>Other</WebServerType>
</OrderParameters>
<AdminContact>
<FirstName>System</FirstName>
<LastName>Admin</LastName>
<Phone>555-555-555</Phone>
<Email>blah@xxxxxxxxx</Email>
</AdminContact>
<TechContact>
<FirstName>System</FirstName>
<LastName>Admin</LastName>
<Phone>555-555-5555</Phone>
<Email>blah@xxxxxxxxx</Email>
</TechContact>
<BillingContact>
<FirstName>System</FirstName>
<LastName>Admin</LastName>
<Phone>555-555-5555</Phone>
<Email>blah@xxxxxxxxx</Email>
</BillingContact>
<ApproverEmail>blah@xxxxxxxxx</ApproverEmail>
</Request>
</QuickOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I've also used NuSoap with other functions to the same
"application" without any problems. For example this
works:

$wdsl_query =
'https://prodapi.geotrust.com/webtrust/query.jws?WSDL';
$soap_client = new soapclient($wdsl_query, TRUE);
$soap_proxy = $soap_client->getProxy();
$arr_result = $soap_proxy->ParseCSR($params);

where the $params array looks like:

Array
(
[Request] => Array
(
[QueryRequestHeader] => Array
(
[PartnerCode] => xxx
[AuthToken] => Array
(
[UserName] => xxx
[Password] => xxx
)

[ReplayToken] => none
[UseReplayToken] =>
)

[CSR] =>long CSR here
)

)

Sorry for the long-winded message. ...just wanted to
make sure I included all necessary information. Any
help would be very much appreciated. Can you CC my
address?

Thanks,

Bob




__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nusoap-general mailing list
Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/nusoap-general


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id?66&op=click
_______________________________________________
Nusoap-general mailing list
Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/nusoap-general


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise