axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ZHAO <zhaoqi.en...@gmail.com>
Subject Axis invocation error
Date Mon, 28 Aug 2006 09:57:22 GMT
Hello,

I've deployed two services, one axis service, one muse service.
In the impl file of axis, i want to invoke an operation of the muse service.
But everytime i send a request, it returns the following parser_error.
I attach as well the code of invocation. Can anyone help?
Thank you in advance.

javax.xml.rpc.ServiceException: Error processing WSDL document:

WSDLException (at
/definitions/import[1]/wsdl:definitions/wsdl:types/xsd:schema/

xsd:schema): faultCode=PARSER_ERROR: Problem parsing '
http://localhost:8080/muse

/spec/xml/XML-Namespace-1998.xsd'.:
http://localhost:8080/muse/spec/xml/XMLSchem

a.dtd: java.io.FileNotFoundException:
http://localhost:8080/muse/spec/xml/XMLSchema.dtd


    private static String endpoint=new String("
http://localhost:8080/muse/services/router5");
    private static String namespace=new String("
http://example.org/services/Router5");
    private static String portName=new String("router5");
    private static String serviceName=new String("RouterService");
    private static String wsdlLocation=new String("
http://localhost:8080/muse/services/router5?wsdl");

        try{
            ServiceFactory factory =ServiceFactory.newInstance();
            Service service = factory.createService(new
URL(wsdlLocation),new QName(serviceName));
            QName port = new QName(namespace,portName);

            QName operation = new QName(namespace,"AddRoute");
            Call call = service.createCall(port);
            call.setTargetEndpointAddress(endpoint);

            call.setProperty(Call.SOAPACTION_USE_PROPERTY,new
Boolean(true));
            call.setProperty(Call.SOAPACTION_URI_PROPERTY, "
http://example.org/services/Router5/Router5PortType/AddRouteRequest");

            call.setProperty("javax.xml.rpc.encodingstyle.namespace.uri",
"");
            call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");


            QName REQUEST_QNAME = new QName(namespace, "AddRouteRequest");
            // the first parameter come from the WSDL after "types", under
"message"->"part": name
            call.addParameter("AddRouteRequest", REQUEST_QNAME,
ParameterMode.IN);
            Object response=call.invoke(new Object[]{dest,fwd});
            System.err.println("Response is: "+response.toString());
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }

Mime
View raw message