cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sabbir <sabbir.ash...@gmail.com>
Subject Re: CXF service consumed by PHP with </parameters> block
Date Tue, 13 Apr 2010 16:13:27 GMT

Please explain the problem in details.


Ayan Chakraborty wrote:
> 
> Thanks Sabbir for your reply. I am calling with Java. It seems it should 
> be related to Web Service Client.Please help me to fix the problem.
> 
> sabbir wrote:
>> Thanks Daniel for your reply. I was confused if there is other standard
>> to
>> expose webservice for other platform even soap has standard. 
>>
>> I resolved the issue by myself, it was the issue with Php SOAP Client.
>> Soap
>> Client was generating a extra parameter block. 
>>
>> I posting the code if it may help to others user...
>> I used nusoap.
>>
>> $endpoint = "http://server:8080/provision/services/provision";
>> $ns = "provision.ws.namespace.com"; 
>>
>> $client = new nusoapclient($endpoint);
>> $result = $client->call('doTest', array ('index' => 12), $ns);
>>
>> echo '<h2>Request</h2>';
>> echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
>> echo '<h2>Response</h2>';
>> echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) .
>> '</pre>';
>>
>>
>>
>>
>>  
>>
>> dkulp wrote:
>>   
>>> This would be an issue on the PHP side.    I'm not sure if any of us
>>> have
>>> used 
>>> the PHP soap stuff so I'm not sure what the solution would be.   Do they
>>> have 
>>> a mailing list to ask on?
>>>
>>> Dan
>>>
>>>
>>> On Monday 12 April 2010 8:53:06 pm sabbir wrote:
>>>     
>>>> Hi,
>>>>
>>>> Im trying the consume a web service by PHP. The web service is exposed
>>>> by
>>>> CXF.
>>>> But when php request like following...There is a block <parameters>
in
>>>> request ?? So im getting a error message in Server console
>>>>
>>>> org.apache.cxf.interceptor.Fault: Unexpected wrapper element parameters
>>>> found.   Expected {provision.ws.vipernetworks.com}doTest.
>>>>
>>>>
>>>> Address: /provision/services/provision
>>>> Encoding: ISO-8859-1
>>>> Content-Type: text/xml; charset=ISO-8859-1
>>>> Headers: {content-type=[text/xml; charset=ISO-8859-1],
>>>> host=[server:8080],
>>>> Content-Length=[424], SOAPAction=["doTe
>>>> st"], user-agent=[NuSOAP/0.7.2 (1.94)], Content-Type=[text/xml;
>>>> charset=ISO-8859-1]}
>>>> Payload: <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope
>>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/e
>>>> nvelope/" 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:tns="provision.ws.vipernetworks.com">
>>>>
>>>> <SOAP-ENV:Body>
>>>> <parameters>
>>>> <index xmlns="">10</index>
>>>> </parameters>
>>>>
>>>> </SOAP-ENV:Body></SOAP-ENV:Envelope>
>>>>
>>>>
>>>> But In soapUI works fine.
>>>>
>>>>
>>>> Service WSDL :
>>>>
>>>>
>>>>   <?xml version="1.0" encoding="UTF-8" ?>
>>>> - <wsdl:definitions name="ProvisionImplService"
>>>> targetNamespace="provision.ws.vipernetworks.com"
>>>> xmlns:ns1="http://cxf.apache.org/bindings/xformat"
>>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>> xmlns:tns="provision.ws.vipernetworks.com"
>>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>> - <wsdl:types>
>>>> - <xs:schema elementFormDefault="unqualified"
>>>> targetNamespace="provision.ws.vipernetworks.com" version="1.0"
>>>> xmlns:tns="provision.ws.vipernetworks.com"
>>>> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>>>   <xs:element name="doTest" type="tns:doTest" />
>>>>   <xs:element name="doTestResponse" type="tns:doTestResponse" />
>>>> - <xs:complexType name="doTest">
>>>> - <xs:sequence>
>>>>   <xs:element name="index" type="xs:int" />
>>>>   </xs:sequence>
>>>>   </xs:complexType>
>>>> - <xs:complexType name="doTestResponse">
>>>> - <xs:sequence>
>>>>   <xs:element minOccurs="0" name="return" type="xs:string" />
>>>>   </xs:sequence>
>>>>   </xs:complexType>
>>>>   </xs:schema>
>>>>   </wsdl:types>
>>>> - <wsdl:message name="doTest">
>>>>   <wsdl:part element="tns:doTest" name="parameters" />
>>>>   </wsdl:message>
>>>> - <wsdl:message name="doTestResponse">
>>>>   <wsdl:part element="tns:doTestResponse" name="parameters" />
>>>>   </wsdl:message>
>>>> - <wsdl:portType name="Provision">
>>>> - <wsdl:operation name="doTest">
>>>>   <wsdl:input message="tns:doTest" name="doTest" />
>>>>   <wsdl:output message="tns:doTestResponse" name="doTestResponse" />
>>>>   </wsdl:operation>
>>>>   </wsdl:portType>
>>>> - <wsdl:binding name="ProvisionImplServiceSoapBinding"
>>>> type="tns:Provision"> <soap:binding style="document"
>>>> transport="http://schemas.xmlsoap.org/soap/http" />
>>>> - <wsdl:operation name="doTest">
>>>>   <soap:operation soapAction="" style="document" />
>>>> - <wsdl:input name="doTest">
>>>>   <soap:body use="literal" />
>>>>   </wsdl:input>
>>>> - <wsdl:output name="doTestResponse">
>>>>   <soap:body use="literal" />
>>>>   </wsdl:output>
>>>>   </wsdl:operation>
>>>>   </wsdl:binding>
>>>> - <wsdl:service name="ProvisionImplService">
>>>> - <wsdl:port binding="tns:ProvisionImplServiceSoapBinding"
>>>> name="ProvisionImplPort">
>>>>   <soap:address
>>>> location="http://server:8080/provision/services/provision"
>>>> />
>>>>   </wsdl:port>
>>>>   </wsdl:service>
>>>>   </wsdl:definitions>
>>>>
>>>>
>>>> Please let me know if there any way exposing the Service ?
>>>>       
>>> -- 
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://dankulp.com/blog
>>>
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/CXF-service-consumed-by-PHP-with-%3C-parameters%3E-block-tp28219209p28232493.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message