Hi,
I'm getting an error when running DII client for a document/literal webservice. 
It can not determine the parameter type. Static client works. 
Any help would be greatly appreciated.
Luan

     [java] the serializer/deserializer for parameter number: 0,named: 
"{http://www.w3.org/2001/XMLSchema}string";, type: 
"{http://www.w3.org/2001/XMLSchema}str
ing", is ambiguous because its class could not be determined

The DII client code is as follows:
import java.net.*;
import javax.xml.rpc.*;
import javax.xml.namespace.*;

public class WSDIIClient {

    private static String qnameService = "MgiParser";
    private static String qnamePort = "MgiParserInterfacePort";
    private static String endpoint_url = 
"http://localhost:8080/MgiParserServerJBoss/myParserService";;
    private static String wsdl_url = 
"http://localhost:8080/MgiParserServerJBoss/myParserService?wsdl";;
    private static String target_namespace = "http://com.mgiparser/MgiParser";;
    private static String NS_XSD =
        "http://www.w3.org/2001/XMLSchema";;
    private static String part_name = "parameters";
    private static String operation_name = "getParsingResult";

    public static void main(String[] args) {

        try {
            ServiceFactory factory =
                ServiceFactory.newInstance();

            Service service =
                factory.createService(new URL(wsdl_url),
                new QName(target_namespace, qnameService));

            QName port = new QName(target_namespace, qnamePort);

            Call call = service.createCall(port);

            call.setTargetEndpointAddress(endpoint_url);

            call.setProperty(Call.SOAPACTION_USE_PROPERTY,
                new Boolean(true));
            call.setProperty(Call.SOAPACTION_URI_PROPERTY,
                "http://com.mgiparser/MgiParser/getParsingResult";);

            call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "");

call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");

                QName QNAME_TYPE_STRING =
                                new QName(NS_XSD, "string");
                    call.setReturnType(QNAME_TYPE_STRING);

                     call.setOperationName(
                                new QName(target_namespace, operation_name));

                    call.addParameter(part_name, QNAME_TYPE_STRING,
                                ParameterMode.IN);

                    Object[] params = new Object[] { "test string1","test 
string2" };

                    String result = (String)call.invoke(params);
            System.out.println(result);

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3920761#3920761

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3920761


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to