style: rpc to document

Hi,

I've realised a web service with style=rpc and now I want to change to "document".

Everything is ok, but my DIIclient throw this error :ERROR org.jboss.ws.jaxrpc.CallImpl - Call invocation failed with SOAPFaultException

javax.xml.rpc.soap.SOAPFaultException: Endpoint cannot handle requests in state: CREATED

May be it's due to the type of the data sent and returned. any idea ?

here is my DIIclient code:Call call = service.createCall();

call.setOperationName(new QName(TARGET_NAMESPACE,"sendObject"));

call.addParameter("String_1", Constants.TYPE_LITERAL_STRING, ParameterMode.IN);

call.setReturnType(Constants.TYPE_LITERAL_STRING);

call.setTargetEndpointAddress(ENDPOINT);

Object[] params ={"hello"};

try{

String result= (String)call.invoke(params);

System.out.println(result);

}

catch (Exception e){

fail("Bad response format: "+ e);

}

If i change a line to "call.setReturnType(new QName(TARGET_NAMESPACE,"sendObjectResponse"));" it throws this error :

IllegalArgumentException: Invalid null parameter;

What do I have to do ?

FYI here is my WSDL:<definitions name='IWSCcmd' targetNamespace='http://com.emailvision.ws/ccmd/docstyle'

xmlns='http://schemas.xmlsoap.org/wsdl/'

xmlns:ns1='http://com.emailvision.ws/ccmd/docstyle/types'

xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'

xmlns:tns='http://com.emailvision.ws/ccmd/docstyle'

xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

<types>

<schema targetNamespace='http://com.emailvision.ws/ccmd/docstyle/types'

xmlns='http://www.w3.org/2001/XMLSchema'

xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'

xmlns:tns='http://com.emailvision.ws/ccmd/docstyle/types'

xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

<complexType name='sendObject'>

<sequence>

<element name='String_1' nillable='true' type='string'/>

</sequence>

</complexType>

<complexType name='sendObjectResponse'>

<sequence>

<element name='result' nillable='true' type='string'/>

</sequence>

</complexType>

<element name='sendObject' type='tns:sendObject'/>

<element name='sendObjectResponse' type='tns:sendObjectResponse'/>

</schema>

</types>

<message name='IWSCcmd_sendObject'>

<part element='ns1:sendObject' name='parameters'/>

</message>

<message name='IWSCcmd_sendObjectResponse'>

<part element='ns1:sendObjectResponse' name='result'/>

</message>

<portType name='IWSCcmd'>

<operation name='sendObject'>

<input message='tns:IWSCcmd_sendObject'/>

<output message='tns:IWSCcmd_sendObjectResponse'/>

</operation>

</portType>

<binding name='IWSCcmdBinding' type='tns:IWSCcmd'>

<soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>

<operation name='sendObject'>

<soap:operation soapAction=''/>

<input>

<soap:body use='literal'/>

</input>

<output>

<soap:body use='literal'/>

</output>

</operation>

</binding>

<service name='IWSCcmd'>

<port binding='tns:IWSCcmdBinding' name='IWSCcmdPort'>

<soap:address location='REPLACE_WITH_ACTUAL_URL'/>

</port>

</service>

</definitions>

[5370 byte] By [ydriuttia] at [2007-11-27 4:04:37]
# 1

Oups...

It's certainly due to the used libraries :import javax.xml.rpc.Call;

import javax.xml.rpc.ParameterMode;

import javax.xml.rpc.Service;

import javax.xml.rpc.ServiceException;

import javax.xml.rpc.ServiceFactory;

Now I'm looking for which libraries i have to use for "document" style... If you have an idea, it could be faster for me.

Thanks.

ydriuttia at 2007-7-12 9:09:30 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Raaaaaaaaa....It's seems to be not true...Can you help me ?
ydriuttia at 2007-7-12 9:09:30 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Check the following page. http://msdn2.microsoft.com/en-us/library/ms996466.aspxIt has a section called "Converting RPC/literal to Document/literal". I thought it might be what you are looking for.
mahmut.uludaga at 2007-7-12 9:09:30 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Thanks, but , actually your links shows what to change in the WSDL. The problem for me comes from the client.You can see my WSDL (in document style) in the first post.Does someone knows what to change in my client ?
ydriuttia at 2007-7-12 9:09:30 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...