nusoap client Error: Response not of type text/xml

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ofir0803
Forum Newbie
Posts: 22
Joined: Sun Jan 18, 2009 3:03 pm

nusoap client Error: Response not of type text/xml

Post by ofir0803 »

Hi,

trying to connect to a ws with nusoap
I'm new on this...

From what I understood from my wsdl:
I have a function name: Get_Siebel_Data
this function is getting 2 vars type string :
Inp_Operation and Inp_Val
the Get_Siebel_Data() return a var named XML_Doc
i'm trying to implement the client but i keep getting this error:
Error: Response not of type text/xml: application/wsdl+xml
Can anyone tell me what I do wrong?



this is my client code:

Code: Select all

 
<?php
    require_once("nusoap/lib/nusoap.php");
 
 //instantiate the NuSOAP class and define the web service URL:
 
    //$param = array( 'Inp_Val' => '33','Inp_Operation'=>'2');
 
    $client = new soapclient("http://localhost/test/wsdl/Get_Siebel_Data.wsdl");
 
 
  //check if there were any instantiation errors, and if so stop execution with an error message:
  $error = $client->getError();
 
  if ($error)
  {
    die("client construction error: {$error}\n");
  }
 
  //authenticate to the service:
 // $client->setCredentials('Inp_Val', 'Inp_Operation');
 
  //perform a function call with parameters:
  $param = array('Inp_Val' => 'Inp_Val_param',
                 'Inp_Operation' => 'Inp_Operation_param',
                );
 
  $answer = $client->call('Get_Siebel_Data', $param);
 
 
  //check if there were any call errors, and if so stop execution with some error messages:
  $error = $client->getError();
 
  if ($error)
  {
    print_r($client->response);
    print_r($client->getDebug());
    die();
  }
 
  //output the response (in the form of a multidimensional array) from the function call:
 
   print_r($answer);
 
 
?>
 
and this is my output:

Code: Select all

 
<html>
<head><title>xmlrpc</title></head>
<body>
HTTP/1.1 200 OK
Date: Tue, 23 Feb 2010 08:40:06 GMT
Server: Apache/2.2.8 (Win32)
Last-Modified: Thu, 18 Jun 2009 12:10:23 GMT
ETag: "8b4500000000ee08-762-46c9e4ad5c9c0"
Accept-Ranges: bytes
Content-Length: 1890
Connection: close
Content-Type: application/wsdl+xml
 
<?xml version="1.0" encoding="UTF-8"?><?Siebel-Property-Set EscapeNames="false"?><definitions
 xmlns="http://schemas.xmlsoap.org/wsdl/"
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 targetNamespace="http://siebel.com/asi/"
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:tns="http://siebel.com/asi/"
><types
></types
><message
 name="DPZ_Get_Siebel_Data_Get_Siebel_Data_Output"
><part
 name="XML_Doc"
 type="xsd:string"
></part
></message
><message
 name="DPZ_Get_Siebel_Data_Get_Siebel_Data_Input"
><part
 name="Inp_Val"
 type="xsd:string"
></part
><part
 name="Inp_Operation"
 type="xsd:string"
></part
></message
><portType
 name="DPZ_Get_Siebel_Data"
><operation
 name="Get_Siebel_Data"
><input
 message="tns:DPZ_Get_Siebel_Data_Get_Siebel_Data_Input"
></input
><output
 message="tns:DPZ_Get_Siebel_Data_Get_Siebel_Data_Output"
></output
></operation
></portType
><binding
 name="DPZ_Get_Siebel_Data_Binding"
 type="tns:DPZ_Get_Siebel_Data"
><soap:binding
 transport="http://schemas.xmlsoap.org/soap/http"
 style="rpc"
></soap:binding
><operation
 name="Get_Siebel_Data"
><soap:operation
 soapAction="rpc/http://siebel.com/asi/:Get_Siebel_Data"
></soap:operation
><input
><soap:body
 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 namespace="http://siebel.com/asi/"
 use="encoded"
></soap:body
></input
><output
><soap:body
 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 namespace="http://siebel.com/asi/"
 use="encoded"
></soap:body
></output
></operation
></binding
><service
 name="DPZ_Get_Siebel_Data"
><port
 binding="tns:DPZ_Get_Siebel_Data_Binding"
 name="DPZ_Get_Siebel_Data"
><soap:address
 location="http://dpz-tescom/eai_heb/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=BPEL_LINK&Password=BPEL_LINK"
></soap:address
></port
></service
></definitions
>2010-02-23 10:40:06.422758 soapclient: ctor wsdl= timeout=0 response_timeout=30
endpoint=string(47) "http://localhost/test/wsdl/Get_Siebel_Data.wsdl"
2010-02-23 10:40:06.423115 soapclient: instantiate SOAP with endpoint at http://localhost/test/wsdl/Get_Siebel_Data.wsdl
2010-02-23 10:40:06.424844 soapclient: call: operation=Get_Siebel_Data, namespace=http://tempuri.org, soapAction=, rpcParams=, style=rpc, use=encoded, endpointType=soap
params=array(2) {
  ["Inp_Val"]=>
  string(3) "222"
  ["Inp_Operation"]=>
  string(6) "insert"
}
headers=bool(false)
2010-02-23 10:40:06.425171 soapclient: serializing param array for operation Get_Siebel_Data
2010-02-23 10:40:06.425442 soapclient: in serialize_val: name=Inp_Val, type=, name_ns=, type_ns=, use=encoded, soapval=
value=string(3) "222"
attributes=bool(false)
2010-02-23 10:40:06.425743 soapclient: serialize_val: serialize string
2010-02-23 10:40:06.426020 soapclient: serialize_val returning <Inp_Val xsi:type="xsd:string">222</Inp_Val>
2010-02-23 10:40:06.426286 soapclient: in serialize_val: name=Inp_Operation, type=, name_ns=, type_ns=, use=encoded, soapval=
value=string(6) "insert"
attributes=bool(false)
2010-02-23 10:40:06.426565 soapclient: serialize_val: serialize string
2010-02-23 10:40:06.426828 soapclient: serialize_val returning <Inp_Operation xsi:type="xsd:string">insert</Inp_Operation>
2010-02-23 10:40:06.427085 soapclient: wrapping RPC request with encoded method element
2010-02-23 10:40:06.427362 soapclient: In serializeEnvelope length=186 body (max 1000 characters)=<ns7154:Get_Siebel_Data xmlns:ns7154="http://tempuri.org"><Inp_Val xsi:type="xsd:string">222</Inp_Val><Inp_Operation xsi:type="xsd:string">insert</Inp_Operation></ns7154:Get_Siebel_Data> style=rpc use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
2010-02-23 10:40:06.427614 soapclient: headers:
bool(false)
2010-02-23 10:40:06.427875 soapclient: namespaces:
array(0) {
}
2010-02-23 10:40:06.428168 soapclient: endpoint=http://localhost/test/wsdl/Get_Siebel_Data.wsdl, soapAction=, namespace=http://tempuri.org, style=rpc, use=encoded, encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
2010-02-23 10:40:06.428431 soapclient: SOAP message length=583 contents (max 1000 bytes)=<?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/"><SOAP-ENV:Body><ns7154:Get_Siebel_Data xmlns:ns7154="http://tempuri.org"><Inp_Val xsi:type="xsd:string">222</Inp_Val><Inp_Operation xsi:type="xsd:string">insert</Inp_Operation></ns7154:Get_Siebel_Data></SOAP-ENV:Body></SOAP-ENV:Envelope>
 
2010-02-23 10:40:06.428708 soapclient: transporting via HTTP
2010-02-23 10:40:06.431836 soapclient: sending message, length=583
2010-02-23 10:40:06.429026 soap_transport_http: ctor url=http://localhost/test/wsdl/Get_Siebel_Data.wsdl use_curl= curl_options:
array(0) {
}
2010-02-23 10:40:06.429321 soap_transport_http: parsed URL scheme = http
2010-02-23 10:40:06.429582 soap_transport_http: parsed URL host = localhost
2010-02-23 10:40:06.429835 soap_transport_http: parsed URL path = /test/wsdl/Get_Siebel_Data.wsdl
2010-02-23 10:40:06.430107 soap_transport_http: set header Host: localhost
2010-02-23 10:40:06.430393 soap_transport_http: set header User-Agent: NuSOAP/0.7.3 (1.114)
2010-02-23 10:40:06.430663 soap_transport_http: set header Content-Type: text/xml; charset=ISO-8859-1
2010-02-23 10:40:06.431545 soap_transport_http: set header SOAPAction: ""
2010-02-23 10:40:06.432124 soap_transport_http: entered send() with data of length: 583
2010-02-23 10:40:06.432404 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host localhost, port 80
2010-02-23 10:40:06.432680 soap_transport_http: calling fsockopen with host localhost connection_timeout 0
2010-02-23 10:40:06.434279 soap_transport_http: set response timeout to 30
2010-02-23 10:40:06.434602 soap_transport_http: socket connected
2010-02-23 10:40:06.434894 soap_transport_http: set header Content-Length: 583
2010-02-23 10:40:06.435167 soap_transport_http: HTTP request: POST /test/wsdl/Get_Siebel_Data.wsdl HTTP/1.0
2010-02-23 10:40:06.435424 soap_transport_http: HTTP header: Host: localhost
2010-02-23 10:40:06.435676 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.3 (1.114)
2010-02-23 10:40:06.435959 soap_transport_http: HTTP header: Content-Type: text/xml; charset=ISO-8859-1
2010-02-23 10:40:06.436207 soap_transport_http: HTTP header: SOAPAction: ""
2010-02-23 10:40:06.436459 soap_transport_http: HTTP header: Content-Length: 583
2010-02-23 10:40:06.436799 soap_transport_http: wrote data to socket, length = 764
2010-02-23 10:40:06.440611 soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK
2010-02-23 10:40:06.440965 soap_transport_http: read line of 37 bytes: Date: Tue, 23 Feb 2010 08:40:06 GMT
2010-02-23 10:40:06.441229 soap_transport_http: read line of 30 bytes: Server: Apache/2.2.8 (Win32)
2010-02-23 10:40:06.441490 soap_transport_http: read line of 46 bytes: Last-Modified: Thu, 18 Jun 2009 12:10:23 GMT
2010-02-23 10:40:06.441749 soap_transport_http: read line of 44 bytes: ETag: "8b4500000000ee08-762-46c9e4ad5c9c0"
2010-02-23 10:40:06.442019 soap_transport_http: read line of 22 bytes: Accept-Ranges: bytes
2010-02-23 10:40:06.442278 soap_transport_http: read line of 22 bytes: Content-Length: 1890
2010-02-23 10:40:06.442537 soap_transport_http: read line of 19 bytes: Connection: close
2010-02-23 10:40:06.442809 soap_transport_http: read line of 36 bytes: Content-Type: application/wsdl+xml
2010-02-23 10:40:06.443073 soap_transport_http: read line of 2 bytes: 
2010-02-23 10:40:06.443389 soap_transport_http: found end of headers after length 275
2010-02-23 10:40:06.443755 soap_transport_http: want to read content of length 1890
2010-02-23 10:40:06.444039 soap_transport_http: read buffer of 1890 bytes
2010-02-23 10:40:06.444334 soap_transport_http: read to EOF
2010-02-23 10:40:06.444595 soap_transport_http: read body of length 1890
2010-02-23 10:40:06.444859 soap_transport_http: received a total of 2165 bytes of data from server
2010-02-23 10:40:06.445277 soap_transport_http: closed socket
2010-02-23 10:40:06.445578 soap_transport_http: No Content-Encoding header
2010-02-23 10:40:06.445849 soap_transport_http: end of send()
2010-02-23 10:40:06.446141 soapclient: got response, length=1890 type=application/wsdl+xml
2010-02-23 10:40:06.446402 soapclient: Entering parseResponse() for data of length 1890 headers:
array(8) {
  ["date"]=>
  string(29) "Tue, 23 Feb 2010 08:40:06 GMT"
  ["server"]=>
  string(20) "Apache/2.2.8 (Win32)"
  ["last-modified"]=>
  string(29) "Thu, 18 Jun 2009 12:10:23 GMT"
  ["etag"]=>
  string(36) ""8b4500000000ee08-762-46c9e4ad5c9c0""
  ["accept-ranges"]=>
  string(5) "bytes"
  ["content-length"]=>
  string(4) "1890"
  ["connection"]=>
  string(5) "close"
  ["content-type"]=>
  string(20) "application/wsdl+xml"
}
2010-02-23 10:40:06.446748 soapclient: Error: Response not of type text/xml: application/wsdl+xml
 
 
Thank's
ofir0803
Forum Newbie
Posts: 22
Joined: Sun Jan 18, 2009 3:03 pm

Re: nusoap client Error: Response not of type text/xml

Post by ofir0803 »

anyone?
Has anyone encountered this error?
Post Reply