This discussion is archived
0 Replies Latest reply: Apr 29, 2008 8:56 AM by 807574 RSS

WS and format

807574 Newbie
Currently Being Moderated

after too much time searching by myself, i'm throw a bottle...

I must request on a Web Service (provided by a partner) and i have an error :
Le s�rialiseur/d�s�rialiseur pour le num�ro de param�tre : 0, nomm� : "{}string", type : "{}string", est ambigu car sa classe n'a pas pu �tre d�termin�e
that's mean, in an approximative english : the serializer for the parameter (QName) "{}string" is ambiguous because the class cannot be determinated.

Here, is my code :
String endpoint = "";
String qnameService = "WS_MailsParameters";
String qnamePort = "WS_MailsParametersSoap";
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String DOCUMENT = "";
String NS_XSD = "";
String URI_ENCODING = "";

QName operationName = new QName(BODY_NAMESPACE_VALUE,"GetMailsParameters");
QName portName = new QName(BODY_NAMESPACE_VALUE, "WS_MailsParametersSoap");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(new QName(qnameService));

QName port = new QName(qnamePort);

//create JAX-RPC Call using JAX-RPC Service's createCall() method.
Call call = service.createCall(portName);

// Configure your Call instance with its setter methods

call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "");
QName QNAME_TYPE_STRING = new QName("GetMailsParametersResponse", "string");

call.addParameter("Login", QNAME_TYPE_STRING, ParameterMode.IN);
call.addParameter("Password", QNAME_TYPE_STRING, ParameterMode.IN);
call.addParameter("Etablissement", QNAME_TYPE_STRING, ParameterMode.IN);
String[] params = { "<user>","<passwd>","<org>" };

// Invoke the WS operation using the JAX-RPC Call's invoke method
Object result = (String) call.invoke(params);
I have try so much possibilities than i don't know what to do now.
The error is around the line :
Note that this Web Service is an asmx...
anyone have an idea ???
what's wrong ?