|
Re: problems with wsdl and function call: msg#00084php.nusoap.general
When not using WSDL, you need to use soapval for parameters that are not simple types. In particular, I see Request and OrderRequestHeader elements that need to have a type specified. 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: "David Felton" <davidfelton@xxxxxxxxxxxxxxx> Cc: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Monday, May 17, 2004 11:15 AM Subject: RE: [Nusoap-general] problems with wsdl and function call Hey David, No, no luck yet. According to Rob Nichol, NuSoap doesn't yet support the extension of complex types. >From Rob: "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>" I've tried without using WSDL but haven't had much luck. Using: $soap_client = new soapclient('https://prodapi.geotrust.com:443/webtrust/order.jws'); $arr_result = $soap_client->call('QuickOrder', $params, 'http://api.geotrust.com/webtrust/order', 'http://api.geotrust.com/webtrust/order/QuickOrder'); (See my previous post for a definition of $params.) I can get NuSoap to send the following to the server: <?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="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" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd"> <SOAP-ENV:Body> <ns1:QuickOrder xmlns:ns1="http://api.geotrust.com/webtrust/order"> <Request> <OrderRequestHeader> <PartnerCode xsi:type="xsd:string">xxxx</PartnerCode> <ProductCode xsi:type="xsd:string">QUICKSSLPREMIUM</ProductCode> <AuthToken> <UserName xsi:type="xsd:string">xxxx</UserName> <Password xsi:type="xsd:string">xxxx</Password> </AuthToken> <ReplayToken xsi:type="xsd:string">none</ReplayToken> <UseReplayToken xsi:type="xsd:boolean">0</UseReplayToken> <PartnerOrderID xsi:type="xsd:int">1</PartnerOrderID> </OrderRequestHeader> <OrderParameters> <ValidityPeriod xsi:type="xsd:int">12</ValidityPeriod> <ServerCount xsi:type="xsd:int">1</ServerCount> <CSR xsi:type="xsd:string">xxxx</CSR> <WebServerType xsi:type="xsd:string">Other</WebServerType> </OrderParameters> <AdminContact> <FirstName xsi:type="xsd:string">Admin</FirstName> <LastName xsi:type="xsd:string">System</LastName> <Phone xsi:type="xsd:string">555-555-5555</Phone> xsi:type="xsd:string">blah@xxxxxxxx</Email> </AdminContact> <TechContact> <FirstName xsi:type="xsd:string">Admin</FirstName> <LastName xsi:type="xsd:string">System</LastName> <Phone xsi:type="xsd:string">555-555-5555</Phone> xsi:type="xsd:string">blah@xxxxxxxx</Email> </TechContact> <BillingContact> <FirstName xsi:type="xsd:string">Admin</FirstName> <LastName xsi:type="xsd:string">System</LastName> <Phone xsi:type="xsd:string">555-555-5555</Phone> xsi:type="xsd:string">blah@xxxxxxxx</Email> </BillingContact> <ApproverEmail xsi:type="xsd:string">blah@xxxxxxxx</ApproverEmail> </Request></ns1:QuickOrder> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ..but get the following response: DEBUG soapclient: call: QuickOrder, Array, http://api.geotrust.com/webtrust/order, http://api.geotrust.com/webtrust/order/QuickOrder, , rpc, encoded; endpointType: soapclient: serializing param array for operation QuickOrder soapclient: in serialize_val: Array, Request, , , , , encoded soapclient: in serialize_val: Array, OrderRequestHeader, , , , , encoded soapclient: in serialize_val: xxxx, PartnerCode, , , , , encoded soapclient: in serialize_val: QUICKSSLPREMIUM, ProductCode, , , , , encoded soapclient: in serialize_val: Array, AuthToken, , , , , encoded soapclient: in serialize_val: xxxx, UserName, , , , , encoded soapclient: in serialize_val: xxxx, Password, , , , , encoded soapclient: in serialize_val: none, ReplayToken, , , , , encoded soapclient: in serialize_val: , UseReplayToken, , , , , encoded soapclient: in serialize_val: 1, PartnerOrderID, , , , , encoded soapclient: in serialize_val: Array, OrderParameters, , , , , encoded soapclient: in serialize_val: 12, ValidityPeriod, , , , , encoded soapclient: in serialize_val: 1, ServerCount, , , , , encoded soapclient: in serialize_val: xxxxx, CSR, , , , , encoded soapclient: in serialize_val: Other, WebServerType, , , , , encoded soapclient: in serialize_val: Array, AdminContact, , , , , encoded soapclient: in serialize_val: Admin, FirstName, , , , , encoded soapclient: in serialize_val: System, LastName, , , , , encoded soapclient: in serialize_val: 555-555-5555, Phone, , , , , encoded soapclient: in serialize_val: blah@xxxxxxxx, Email, , , , , encoded soapclient: in serialize_val: Array, TechContact, , , , , encoded soapclient: in serialize_val: Admin, FirstName, , , , , encoded soapclient: in serialize_val: System, LastName, , , , , encoded soapclient: in serialize_val: 555-555-5555, Phone, , , , , encoded soapclient: in serialize_val: blah@xxxxxxxx, Email, , , , , encoded soapclient: in serialize_val: Array, BillingContact, , , , , encoded soapclient: in serialize_val: Admin, FirstName, , , , , encoded soapclient: in serialize_val: System, LastName, , , , , encoded soapclient: in serialize_val: 555-555-5555, Phone, , , , , encoded soapclient: in serialize_val: blah@xxxxxxxx, Email, , , , , encoded soapclient: in serialize_val: blah@xxxxxxxx, ApproverEmail, , , , , encoded soapclient: wrapping RPC request with encoded method element soapclient: endpoint: https://prodapi.geotrust.com:443/webtrust/order.jws, soapAction: http://api.geotrust.com/webtrust/order/QuickOrder, namespace: http://api.geotrust.com/webtrust/order, style: rpc, use: encoded soapclient: SOAP message length: 2625 contents: <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="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" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:QuickOrder xmlns:ns1="http://api.geotrust.com/webtrust/order"><Request><OrderRequestHeader><PartnerCode xsi:type="xsd:string">xxxx</PartnerCode><ProductCode xsi:type="xsd:string">QUICKSSLPREMIUM</ProductCode><AuthToken><UserName xsi:type="xsd:string">xxxx</UserName><Password xsi:type="xsd:string">xxxx</Password></AuthToken><ReplayToken xsi:type="xsd:string">none</ReplayToken><UseReplayToken xsi:type="xsd:boolean">0</UseReplayToken><PartnerOrderID xsi:type="xsd:int">1</PartnerOrderID></OrderRequestHeader><OrderParameters><ValidityPeriod xsi:type="xsd:int">12</ValidityPeriod soapclient: transporting via HTTP soapclient: sending message, length: 2625 soapclient: 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: 2625 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: 853 soap_transport_http: end of send() soapclient: got response, length: 853 type: text/xml; charset=UTF-8 soapclient: Entering parseResponse() for data of length 853 and type text/xml; charset=UTF-8 soapclient: Got response encoding: UTF-8 soapclient: Use encoding: UTF-8 when creating soap_parser soapclient: soap_parser: Entering soap_parser(), length=853, 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 soapclient: sent message successfully and got a(n) array back soapclient: got fault soapclient: faultcode = fc:JWSError<br> soapclient: faultstring = Error deserializing arguments. Unrecognized element Request - expected Request@http://api.geotrust.com/webtrust/order <br> soapclient: detail = Array<br> RESPONSE HTTP/1.1 500 Internal Server Error Date: Mon, 17 May 2004 15:15:55 GMT Pragma: no-cache Server: WebLogic Server 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009 with Content-Length: 853 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> Error deserializing arguments. Unrecognized element Request - expected Request@http://api.geotrust.com/webtrust/order </faultstring> <detail> <jwErr:jwErrorDetail xmlns:jwErr='http://www.bea.com/2002/04/jwErrorDetail/'> Error deserializing arguments. Unrecognized element Request - expected Request@http://api.geotrust.com/webtrust/order </jwErr:jwErrorDetail> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Bob --- David Felton <davidfelton@xxxxxxxxxxxxxxx> wrote: > Did you have any luck solving this problem Bob? > > -----Original Message----- > From: nusoap-general-admin@xxxxxxxxxxxxxxxxxxxxx > [mailto:nusoap-general-admin@xxxxxxxxxxxxxxxxxxxxx]On > Behalf Of Bob > Descampa > Sent: 07 May 2004 3:19 > To: nusoap-general@xxxxxxxxxxxxxxxxxxxxx > Subject: Re: [Nusoap-general] problems with wsdl and > function call > > > Ah, okay. Thanks Scott. I'll give this call a try > without WSDL. > > Bob > > --- Scott Nichol <snicholnews@xxxxxxxxxxxxxxx> > wrote: > > Bob, > > > > It seems like you missed this post to the list. I > > am putting your e-mail address in the CC list this > > time. > > > > 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: "Scott Nichol" <snicholnews@xxxxxxxxxxxxxxx> > > To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> > > Sent: Tuesday, May 04, 2004 5:03 PM > > 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 > === message truncated === __________________________________ Do you Yahoo!? SBC Yahoo! - Internet access at a great low price. http://promo.yahoo.com/sbc/ ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ Nusoap-general mailing list Nusoap-general@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/nusoap-general ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: NuSoap Document Literal Encoding: 00084, Scott Nichol |
|---|---|
| Next by Date: | Webservices using https: 00084, Srividya Vaidyanathan |
| Previous by Thread: | RE: problems with wsdl and function calli: 00084, Bob Descampa |
| Next by Thread: | Re: problems with wsdl and function call: 00084, Bob Descampa |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |