You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by ZHAO <zh...@gmail.com> on 2006/08/28 11:57:22 UTC

Axis invocation error

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();
        }

Re: Axis invocation error

Posted by ZHAO <zh...@gmail.com>.
Thank you Anne.
yes, i missed the DTD in /spec/xml/, it's ok now.

But I encoutered a new problem.
The service i want to invoke need a complexType input, so i use the object
generated by Muse WSDL2Java.

When I try to compile, it returns something strange:
 package schemaorg_apache_xmlbeans.system.s9B380A57D5175D0A4505A801
36806024.TypeSystemHolder does not exist

This is something generated in Muse , the link between  java and  xml
schema.
Do I have to include the Router-xbeans.jar (xmlbean generated in Muse web
service).
And how can I do that in the build.xml??
Thank you.

Here is my code and wsdl of Muse service.

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

            QName operation = new QName(namespace,"AddRoute");
            Call call = service.createCall(port,operation);
            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");

            // use="literal" in WSDL
            call.setProperty("javax.xml.rpc.encodingstyle.namespace.uri",
"");
            // style="document" in WSDL
            call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");


            QName REQUEST_QNAME = new QName(namespace, "RouteInput");

            org.example.services.router5.RouteType _routeType=new
org.example.services.router5.impl.RouteTypeImpl(RouteType.type);
            _routeType.setDestinationAddress(dest);
            _routeType.setForwardingAddress(fwd);
            org.example.services.router5.RouteInputDocument _routeInput=new
org.example.services.router5.impl.RouteInputDocumentImpl(
RouteInputDocument.type);
            _routeInput.setRouteInput(_routeType);
            // the first parameter come from the WSDL after "types", under
"message"->"part": name
            call.addParameter("", REQUEST_QNAME,
org.example.services.router5.RouteInputDocument.class,ParameterMode.IN);
            System.out.print("Call: "+call.toString());
            QName RESPONSE_QNAME = new QName(namespace, "RouteOutput");
            call.setReturnType(RESPONSE_QNAME,
org.example.services.router5.RouteOutputDocument.class );
            Object response=call.invoke(new Object[]{_routeInput});
            System.err.println("Response is: "+response.toString());
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }


<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:rs="
http://example.org/services/Router5" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsrp="
http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
xmlns:wsrpw="
http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
xmlns:wsntw="
http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
xmlns:muws-p2-wsdl="
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.wsdl"
xmlns:rs-prop="http://example.org/services/Router5/properties"
targetNamespace="http://example.org/services/Router5"
name="RouterResourceDefinition">
    <import namespace="
http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
location="../spec/wsrf/WS-ResourceProperties-1_2-Draft_01.wsdl"/>
    <import namespace="
http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
location="../spec/wsn/WS-BaseNotification-1_2-Draft_01.wsdl"/>
    <import namespace="
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.wsdl"
location="../spec/wsdm/MUWS-Part2-1_0.wsdl"/>
    <types>
        <schema elementFormDefault="qualified" targetNamespace="
http://example.org/services/Router5" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsbf="
http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
xmlns:wsnt="
http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
xmlns:muws-p1-xs="
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd"
xmlns:muws-p2-xs="
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd" xmlns:rs="
http://example.org/services/Router5">
            <!--xs:include schemaLocation="../Router3/Router3.xsd"/-->
            <xs:import namespace="
http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
schemaLocation="../spec/wsrf/WS-BaseFaults-1_2-Draft_01.xsd"/>
            <xs:import namespace="
http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
schemaLocation="../spec/wsn/WS-BaseNotification-1_2-Draft_01.xsd"/>
            <xs:import namespace="
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd"
schemaLocation="../spec/wsdm/MUWS-Part1-1_0.xsd"/>
            <xs:import namespace="
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd"
schemaLocation="../spec/wsdm/MUWS-Part2-1_0.xsd"/>

<!--===================================================================================-->
            <xs:element name="RouterId" type="xs:string"/>
            <xs:element name="Description" type="xs:string"/>
            <xs:element name="Users" type="rs:userType"/>
            <xs:element name="Routes" type="rs:routeType"/>
            <xs:complexType name="userType">
                <xs:sequence>
                    <xs:element name="username" type="xs:string"/>
                    <xs:element name="password" type="xs:string"/>
                    <xs:element name="profile" type="rs:profileType"/>
                </xs:sequence>
            </xs:complexType>
            <xs:simpleType name="profileType">
                <xs:restriction base="xs:string">
                    <xs:enumeration value="admin"/>
                    <xs:enumeration value="manager"/>
                    <xs:enumeration value="client"/>
                </xs:restriction>
            </xs:simpleType>
            <xs:simpleType name="IPAddressType">
                <xs:annotation>
                    <xs:documentation>An IP Address that matches the
following form:132.174.95.5
                </xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string">
                    <xs:pattern
value="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"/>
                </xs:restriction>
            </xs:simpleType>
            <xs:complexType name="routeType">
                <xs:sequence>
                    <xs:element name="destinationAddress"
type="rs:IPAddressType"/>
                    <xs:element name="forwardingAddress"
type="rs:IPAddressType"/>
                </xs:sequence>
            </xs:complexType>

<!--=====================================================================================-->
            <!-- Resource Properties Document Schema -->
            <element name="RouterProperties">
                <complexType>
                    <sequence>
                        <!-- props for wsrl:ScheduledResourceTermination
portType -->
                        <!-- props for wsnt:NotificationProducer portType
-->
                        <element ref="wsnt:Topic" maxOccurs="unbounded"/>
                        <element ref="wsnt:FixedTopicSet"/>
                        <element ref="wsnt:TopicExpressionDialects"
maxOccurs="unbounded"/>
                        <!-- props for rs:RouterPortType portType -->
                        <element ref="rs:RouterId" minOccurs="1"/>
                        <element ref="rs:Description" minOccurs="0"/>
                        <element ref="rs:Users" minOccurs="1"/>
                        <element ref="rs:Routes"/>
                        <!-- props for MUWS  -->
                        <element ref="muws-p1-xs:ResourceId"/>
                        <element ref="muws-p1-xs:ManageabilityCapability"
minOccurs="0" maxOccurs="unbounded"/>
                        <element ref="muws-p2-xs:OperationalStatus"/>
                        <element ref="muws-p2-xs:Relationship" minOccurs="0"
maxOccurs="unbounded"/>
                    </sequence>
                </complexType>
            </element>

<!--=========================================================================================-->
            <!-- message types for custom operations -->
            <!-- element for message "UserExistFault"  operation "AddUser"
-->
            <xs:element name="UserExistFault">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="wsbf:BaseFaultType"/>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
            <!-- element for message "AddUserRequestt"  operation "AddUser"
-->
            <xs:element name="UserInput" type="rs:userType"/>
            <!-- element for message "AddUserResponse"  operation "AddUser"
-->
            <xs:element name="UserOutput" type="rs:userType"/>
            <!-- element for message "GetRouteRequest"  operation "GetRoute"
-->
            <xs:element name="GetRouteInput" type="rs:IPAddressType"/>
            <!-- element for message "GetRouteResponse"  operation
"GetRoute" -->
            <xs:element name="GetRouteOutput" type="rs:routeType"/>
            <!-- element for message "AddRouteRequest"  operation "AddRoute"
-->
            <xs:element name="RouteInput" type="rs:routeType"/>
            <!-- element for message "AddRouteResponse"  operation
"AddtRoute" -->
            <xs:element name="RouteOutput" type="rs:routeType"/>
            <xs:element name="LoginInput">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="username" type="xs:string"/>
                        <xs:element name="password" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="LoginOutput" type="xs:string"/>
            <xs:element name="LogoutInput" type="xs:string"/>
            <xs:element name="LogoutOutput" type="xs:string"/>
        </schema>
    </types>
    <message name="UserExistFault">
        <part name="UserExistFault" element="rs:UserExistFault"/>
    </message>
    <message name="AddUserRequest">
        <part name="AddUserRequest" element="rs:UserInput"/>
    </message>
    <message name="AddUserResponse">
        <part name="AddUserResponse" element="rs:UserOutput"/>
    </message>
    <message name="AddRouteRequest">
        <part name="AddRouteRequest" element="rs:RouteInput"/>
    </message>
    <message name="AddRouteResponse">
        <part name="AddRouteResponse" element="rs:RouteOutput"/>
    </message>
    <message name="GetRouteRequest">
        <part name="GetRouteRequest" element="rs:GetRouteInput"/>
    </message>
    <message name="GetRouteResponse">
        <part name="GetRouteResponse" element="rs:GetRouteOutput"/>
    </message>
    <message name="LoginRequest">
        <part name="LoginRequest" element="rs:LoginInput"/>
    </message>
    <message name="LoginResponse">
        <part name="LoginResponse" element="rs:LoginOutput"/>
    </message>
    <message name="LogoutRequest">
        <part name="LogoutRequest" element="rs:LogoutInput"/>
    </message>
    <message name="LogoutResponse">
        <part name="LogoutResponse" element="rs:LogoutOutput"/>
    </message>
    <portType name="Router5PortType"
wsrp:ResourceProperties="rs:RouterProperties">
        <!-- wsrpw:* operations -->
        <operation name="GetResourceProperty">
            <input name="GetResourcePropertyRequest"
message="wsrpw:GetResourcePropertyRequest"/>
            <output name="GetResourcePropertyResponse"
message="wsrpw:GetResourcePropertyResponse"/>
            <fault name="ResourceUnknownFault"
message="wsrpw:ResourceUnknownFault"/>
            <fault name="InvalidResourcePropertyQNameFault"
message="wsrpw:InvalidResourcePropertyQNameFault"/>
        </operation>
        <operation name="GetMultipleResourceProperties">
            <input name="GetMultipleResourcePropertiesRequest"
message="wsrpw:GetMultipleResourcePropertiesRequest"/>
            <output name="GetMultipleResourcePropertiesResponse"
message="wsrpw:GetMultipleResourcePropertiesResponse"/>
            <fault name="ResourceUnknownFault"
message="wsrpw:ResourceUnknownFault"/>
            <fault name="InvalidResourcePropertyQNameFault"
message="wsrpw:InvalidResourcePropertyQNameFault"/>
        </operation>
        <operation name="SetResourceProperties">
            <input name="SetResourcePropertiesRequest"
message="wsrpw:SetResourcePropertiesRequest"/>
            <output name="SetResourcePropertiesResponse"
message="wsrpw:SetResourcePropertiesResponse"/>
            <fault name="ResourceUnknownFault"
message="wsrpw:ResourceUnknownFault"/>
            <fault name="InvalidResourcePropertyQNameFault"
message="wsrpw:InvalidResourcePropertyQNameFault"/>
            <fault name="InvalidSetResourcePropertiesRequestContentFault"
message="wsrpw:InvalidSetResourcePropertiesRequestContentFault"/>
            <fault name="UnableToModifyResourcePropertyFault"
message="wsrpw:UnableToModifyResourcePropertyFault"/>
            <fault name="SetResourcePropertyRequestFailedFault"
message="wsrpw:SetResourcePropertyRequestFailedFault"/>
        </operation>
        <operation name="QueryResourceProperties">
            <input name="QueryResourcePropertiesRequest"
message="wsrpw:QueryResourcePropertiesRequest"/>
            <output name="QueryResourcePropertiesResponse"
message="wsrpw:QueryResourcePropertiesResponse"/>
            <fault name="ResourceUnknownFault"
message="wsrpw:ResourceUnknownFault"/>
            <fault name="InvalidResourcePropertyQNameFault"
message="wsrpw:InvalidResourcePropertyQNameFault"/>
            <fault name="UnknownQueryExpressionDialectFault"
message="wsrpw:UnknownQueryExpressionDialectFault"/>
            <fault name="InvalidQueryExpressionFault"
message="wsrpw:InvalidQueryExpressionFault"/>
            <fault name="QueryEvaluationErrorFault"
message="wsrpw:QueryEvaluationErrorFault"/>
        </operation>
        <!-- wsrlw:ImmediateResourceTermination operation -->
        <!-- wsrlw:ScheduledResourceTermination operation -->
        <!-- wsntw:NotificationProducer operations -->
        <operation name="Subscribe">
            <input message="wsntw:SubscribeRequest"/>
            <output message="wsntw:SubscribeResponse"/>
            <fault name="ResourceUnknownFault"
message="wsntw:ResourceUnknownFault"/>
            <fault name="SubscribeCreationFailedFault"
message="wsntw:SubscribeCreationFailedFault"/>
            <fault name="TopicPathDialectUnknownFault"
message="wsntw:TopicPathDialectUnknownFault"/>
        </operation>
        <operation name="GetCurrentMessage">
            <input message="wsntw:GetCurrentMessageRequest"/>
            <output message="wsntw:GetCurrentMessageResponse"/>
            <fault name="ResourceUnknownFault"
message="wsntw:ResourceUnknownFault"/>
            <fault name="InvalidTopicExpressionFault"
message="wsntw:InvalidTopicExpressionFault"/>
            <fault name="TopicNotSupportedFault"
message="wsntw:TopicNotSupportedFault"/>
            <fault name="NoCurrentMessageOnTopicFault"
message="wsntw:NoCurrentMessageOnTopicFault"/>
        </operation>
        <!-- muws-p2-wsdl:Relationships operation -->
        <operation name="QueryRelationshipsByType">
            <input message="muws-p2-wsdl:QueryRelationshipsByTypeRequest"/>
            <output
message="muws-p2-wsdl:QueryRelationshipsByTypeResponse"/>
        </operation>
        <!-- custom operations -->
        <operation name="AddUser">
            <input name="AddUserRequest" message="rs:AddUserRequest"/>
            <output name="AddUserResponse" message="rs:AddUserResponse"/>
            <fault name="UserExistFault" message="rs:UserExistFault"/>
        </operation>
        <operation name="GetRoute">
            <input name="GetRouteRequest" message="rs:GetRouteRequest"/>
            <output name="GetRouteResponse" message="rs:GetRouteResponse"/>
        </operation>
        <operation name="AddRoute">
            <input name="AddRouteRequest" message="rs:AddRouteRequest"/>
            <output name="AddRouteResponse" message="rs:AddRouteResponse"/>
        </operation>
        <operation name="Login">
            <input name="LoginRequest" message="rs:LoginRequest"/>
            <output name="LoginResponse" message="rs:LoginResponse"/>
        </operation>
        <operation name="Logout">
            <input name="LogoutRequest" message="rs:LogoutRequest"/>
            <output name="LogoutResponse" message="rs:LogoutResponse"/>
        </operation>
    </portType>
    <binding name="RouterSoapHttpBinding" type="rs:Router5PortType">
        <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
        <!-- wsrpw:* operations -->
        <operation name="GetResourceProperty">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="ResourceUnknownFault">
                <soap:fault name="ResourceUnknownFault" use="literal"/>
            </fault>
            <fault name="InvalidResourcePropertyQNameFault">
                <soap:fault name="InvalidResourcePropertyQNameFault"
use="literal"/>
            </fault>
        </operation>
        <operation name="GetMultipleResourceProperties">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="ResourceUnknownFault">
                <soap:fault name="ResourceUnknownFault" use="literal"/>
            </fault>
            <fault name="InvalidResourcePropertyQNameFault">
                <soap:fault name="InvalidResourcePropertyQNameFault"
use="literal"/>
            </fault>
        </operation>
        <operation name="SetResourceProperties">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="ResourceUnknownFault">
                <soap:fault name="ResourceUnknownFault" use="literal"/>
            </fault>
            <fault name="InvalidResourcePropertyQNameFault">
                <soap:fault name="InvalidResourcePropertyQNameFault"
use="literal"/>
            </fault>
            <fault name="UnableToModifyResourcePropertyFault">
                <soap:fault name="UnableToModifyResourcePropertyFault"
use="literal"/>
            </fault>
            <fault name="InvalidSetResourcePropertiesRequestContentFault">
                <soap:fault
name="InvalidSetResourcePropertiesRequestContentFault" use="literal"/>
            </fault>
            <fault name="SetResourcePropertyRequestFailedFault">
                <soap:fault name="SetResourcePropertyRequestFailedFault"
use="literal"/>
            </fault>
        </operation>
        <operation name="QueryResourceProperties">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="ResourceUnknownFault">
                <soap:fault name="ResourceUnknownFault" use="literal"/>
            </fault>
            <fault name="InvalidResourcePropertyQNameFault">
                <soap:fault name="InvalidResourcePropertyQNameFault"
use="literal"/>
            </fault>
            <fault name="UnknownQueryExpressionDialectFault">
                <soap:fault name="UnknownQueryExpressionDialectFault"
use="literal"/>
            </fault>
            <fault name="InvalidQueryExpressionFault">
                <soap:fault name="InvalidQueryExpressionFault"
use="literal"/>
            </fault>
            <fault name="QueryEvaluationErrorFault">
                <soap:fault name="QueryEvaluationErrorFault" use="literal"/>
            </fault>
        </operation>
        <!-- wsrlw:ImmediateResourceTermination operation -->
        <!-- wsrlw:ScheduledResourceTermination operation -->
        <!-- wsntw:NotificationProducer operations -->
        <operation name="Subscribe">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="ResourceUnknownFault">
                <soap:fault name="ResourceUnknownFault" use="literal"/>
            </fault>
            <fault name="SubscribeCreationFailedFault">
                <soap:fault name="SubscribeCreationFailedFault"
use="literal"/>
            </fault>
            <fault name="TopicPathDialectUnknownFault">
                <soap:fault name="TopicPathDialectUnknownFault"
use="literal"/>
            </fault>
        </operation>
        <operation name="GetCurrentMessage">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="ResourceUnknownFault">
                <soap:fault name="ResourceUnknownFault" use="literal"/>
            </fault>
            <fault name="InvalidTopicExpressionFault">
                <soap:fault name="InvalidTopicExpressionFault"
use="literal"/>
            </fault>
            <fault name="TopicNotSupportedFault">
                <soap:fault name="TopicNotSupportedFault" use="literal"/>
            </fault>
            <fault name="NoCurrentMessageOnTopicFault">
                <soap:fault name="NoCurrentMessageOnTopicFault"
use="literal"/>
            </fault>
        </operation>
        <!-- muws-p2-wsdl:Relationships operation -->
        <operation name="QueryRelationshipsByType">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <!-- *** custom operations *** -->
        <operation name="AddUser">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
            <fault name="UserExistFault">
                <soap:fault name="UserExistFault" use="literal"/>
            </fault>
        </operation>
        <operation name="AddRoute">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="GetRoute">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="Login">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="Logout">
            <soap:operation soapAction="
http://localhost:8080/muse/services/router5" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="RouterService">
        <!-- Note: the port name becomes the service name in the wsdd
generated by Wsdl2Java -->
        <!-- *** Change the port name and the soap:address location below to
reflect the desired endpoint URL *** -->
        <port name="router5" binding="rs:RouterSoapHttpBinding">
            <soap:address location="
http://localhost:8080/muse/services/router5"/>
        </port>
    </service>
    <!-- message definitions for custom operations -->
</definitions>



On 8/28/06, Anne Thomas Manes <at...@gmail.com> wrote:
>
> It looks to me as if you've imported a DTD in the WSDL. That'ts not
> permitted.
> Please post the WSDL.
>
> Anne
>
> On 8/28/06, ZHAO <zh...@gmail.com> wrote:
> > 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 ();
> >         }
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Axis invocation error

Posted by Anne Thomas Manes <at...@gmail.com>.
It looks to me as if you've imported a DTD in the WSDL. That'ts not permitted.
Please post the WSDL.

Anne

On 8/28/06, ZHAO <zh...@gmail.com> wrote:
> 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 ();
>         }
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org