axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franck HUGOT (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-69) Problem calling a web service
Date Fri, 08 Jul 2005 11:44:19 GMT
Problem calling a web service
-----------------------------

         Key: AXIS2-69
         URL: http://issues.apache.org/jira/browse/AXIS2-69
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: client-api  
 Environment: JDK1.42, AXIS 1.2 RC2
    Reporter: Franck HUGOT


I have this error when I call a web service on a bea weblogic server :

AxisFault
 faultCode: {http://www.bea.com/2003/04/jwFaultCode/}JWSError
 faultSubcode: 
 faultString: 
        Error deserializing arguments.
Unrecognized element arg0@com/xyz/namespace/ - expected buffer@com/xyz/namespace/
      
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://www.bea.com/2002/04/jwErrorDetail/}jwErrorDetail:
          com.bea.wlw.runtime.core.request.RequestValidationException: Error deserializing
arguments.
Unrecognized element arg0@com/xyz/namespace/ - expected buffer@com/xyz/namespace/ [ServiceException]
	at com.bea.wlw.runtime.jws.request.SoapResponse.processException(SoapResponse.java:194)
	at com.bea.wlw.runtime.core.request.BaseResponse.setFault(BaseResponse.java:23)
	at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:298)
	at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
	at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:168)
	at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
	at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
	at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:49)
	at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:713)
	at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
	at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
	at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: com.bea.wlw.runtime.core.request.RequestValidationException: Error deserializing
arguments.
Unrecognized element arg0@com/xyz/namespace/ - expected buffer@com/xyz/namespace/
	at com.bea.wlw.runtime.jws.request.SoapRequest.resolveArgs(SoapRequest.java:593)
	at com.bea.wlw.runtime.core.request.BaseRequest.validateArgs(BaseRequest.java:306)
	at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:212)
	at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:224)
	at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
	at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:153)
	at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:62)
	at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:153)
	... 19 more
Caused by: com.bea.xml.marshal.XmlEncodingException: Unrecognized element arg0@com/xyz/namespace/
- expected buffer@com/xyz/namespace/
	at com.bea.xml.marshal.UnmarshalContext.error(UnmarshalContext.java:198)
	at com.bea.xml.marshal.UnmarshalContext.error(UnmarshalContext.java:193)
	at com.bea.xml.marshal.BaseUPlan.unmarshal(BaseUPlan.java:507)
	at com.bea.xml.marshal.MethodUPlan.unmarshal(MethodUPlan.java:424)
	at com.bea.wlw.runtime.core.dispatcher.DispMessage.unmarshalXml(DispMessage.java:347)
	at com.bea.wlw.runtime.jws.request.SoapRequest.resolveArgs(SoapRequest.java:585)
	... 26 more

        


        Error deserializing arguments.
Unrecognized element arg0@com/xyz/namespace/ - expected buffer@com/xyz/namespace/
      
	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
	at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:173)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
	at org.apache.axis.client.Call.invoke(Call.java:2702)
	at org.apache.axis.client.Call.invoke(Call.java:2378)
	at org.apache.axis.client.Call.invoke(Call.java:2301)
	at org.apache.axis.client.Call.invoke(Call.java:1758)
	at TestClient.main(TestClient.java:25)



The WSDL on my web service is : 

<?xml version="1.0" encoding="ISO-8859-1"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="com/xyz/namespace/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="com/xyz/namespace/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="com/xyz/namespace/">
<s:element name="callTuxedoServiceXml">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" name="service" type="s:string"/>
<s:element minOccurs="0" name="xmlData" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="callTuxedoServiceXmlResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" name="callTuxedoServiceXmlResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
<s:element name="callTuxedoService">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" name="service" type="s:string"/>
<s:element minOccurs="0" name="buffer" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="callTuxedoServiceResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" name="callTuxedoServiceResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
<message name="callTuxedoServiceXmlSoapIn">
<part element="s0:callTuxedoServiceXml" name="parameters"/>
</message>
<message name="callTuxedoServiceXmlSoapOut">
<part element="s0:callTuxedoServiceXmlResponse" name="parameters"/>
</message>
<message name="callTuxedoServiceSoapIn">
<part element="s0:callTuxedoService" name="parameters"/>
</message>
<message name="callTuxedoServiceSoapOut">
<part element="s0:callTuxedoServiceResponse" name="parameters"/>
</message>
<message name="callTuxedoServiceXmlHttpGetIn">
<part name="service" type="s:string"/>
<part name="xmlData" type="s:string"/>
</message>
<message name="callTuxedoServiceXmlHttpGetOut">
<part element="s0:string" name="Body"/>
</message>
<message name="callTuxedoServiceHttpGetIn">
<part name="service" type="s:string"/>
<part name="buffer" type="s:string"/>
</message>
<message name="callTuxedoServiceHttpGetOut">
<part element="s0:string" name="Body"/>
</message>
<message name="callTuxedoServiceXmlHttpPostIn">
<part name="service" type="s:string"/>
<part name="xmlData" type="s:string"/>
</message>
<message name="callTuxedoServiceXmlHttpPostOut">
<part element="s0:string" name="Body"/>
</message>
<message name="callTuxedoServiceHttpPostIn">
<part name="service" type="s:string"/>
<part name="buffer" type="s:string"/>
</message>
<message name="callTuxedoServiceHttpPostOut">
<part element="s0:string" name="Body"/>
</message>
<portType name="WSTuxedoSoap">
<operation name="callTuxedoServiceXml">
<documentation>Méthode d'appel d'un service TUXEDO. Nécessite que ce service soit
déclaré en /DOMAIN et configuré via WTC.</documentation>
<input message="s0:callTuxedoServiceXmlSoapIn"/>
<output message="s0:callTuxedoServiceXmlSoapOut"/>
</operation>
<operation name="callTuxedoService">
<documentation>Méthode d'appel d'un service TUXEDO. Nécessite que ce service soit
déclaré en /DOMAIN et configuré via WTC.</documentation>
<input message="s0:callTuxedoServiceSoapIn"/>
<output message="s0:callTuxedoServiceSoapOut"/>
</operation>
</portType>
<portType name="WSTuxedoHttpGet">
<operation name="callTuxedoServiceXml">
<documentation>Méthode d'appel d'un service TUXEDO. Nécessite que ce service soit
déclaré en /DOMAIN et configuré via WTC.</documentation>
<input message="s0:callTuxedoServiceXmlHttpGetIn"/>
<output message="s0:callTuxedoServiceXmlHttpGetOut"/>
</operation>
<operation name="callTuxedoService">
<documentation>Méthode d'appel d'un service TUXEDO. Nécessite que ce service soit
déclaré en /DOMAIN et configuré via WTC.</documentation>
<input message="s0:callTuxedoServiceHttpGetIn"/>
<output message="s0:callTuxedoServiceHttpGetOut"/>
</operation>
</portType>
<portType name="WSTuxedoHttpPost">
<operation name="callTuxedoServiceXml">
<documentation>Méthode d'appel d'un service TUXEDO. Nécessite que ce service soit
déclaré en /DOMAIN et configuré via WTC.</documentation>
<input message="s0:callTuxedoServiceXmlHttpPostIn"/>
<output message="s0:callTuxedoServiceXmlHttpPostOut"/>
</operation>
<operation name="callTuxedoService">
<documentation>Méthode d'appel d'un service TUXEDO. Nécessite que ce service soit
déclaré en /DOMAIN et configuré via WTC.</documentation>
<input message="s0:callTuxedoServiceHttpPostIn"/>
<output message="s0:callTuxedoServiceHttpPostOut"/>
</operation>
</portType>
<binding name="WSTuxedoSoap" type="s0:WSTuxedoSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="callTuxedoServiceXml">
<soap:operation soapAction="com/xyz/namespace/callTuxedoServiceXml" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="callTuxedoService">
<soap:operation soapAction="com/xyz/namespace/callTuxedoService" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="WSTuxedoHttpGet" type="s0:WSTuxedoHttpGet">
<http:binding verb="GET"/>
<operation name="callTuxedoServiceXml">
<http:operation location="/callTuxedoServiceXml"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
<operation name="callTuxedoService">
<http:operation location="/callTuxedoService"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<binding name="WSTuxedoHttpPost" type="s0:WSTuxedoHttpPost">
<http:binding verb="POST"/>
<operation name="callTuxedoServiceXml">
<http:operation location="/callTuxedoServiceXml"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
<operation name="callTuxedoService">
<http:operation location="/callTuxedoService"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="WSTuxedo">
<documentation>Web Service passerelle vers Tuxedo (via Weblogic Tuxedo Connector).</documentation>
<port binding="s0:WSTuxedoSoap" name="WSTuxedoSoap">
<soap:address location="http://ntrec51:8001/WSTuxedo/com/sofinco/framework/webservices/tuxedo/WSTuxedo.jws"/>
</port>
<port binding="s0:WSTuxedoHttpGet" name="WSTuxedoHttpGet">
<http:address location="http://ntrec51:8001/WSTuxedo/com/sofinco/framework/webservices/tuxedo/WSTuxedo.jws"/>
</port>
<port binding="s0:WSTuxedoHttpPost" name="WSTuxedoHttpPost">
<http:address location="http://ntrec51:8001/WSTuxedo/com/sofinco/framework/webservices/tuxedo/WSTuxedo.jws"/>
</port>
</service>
</definitions>



Do you have an idea about the problem? Here is my code :



import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;


public class TestClient {
	
	
	public static void main(String[] args) {
		try {
			
			//String endpoint = "http://localhost:8080/axis/services/WSTuxedoJolt";
			String endpoint = "http://ntrec51:8001/WSTuxedo/com/sofinco/framework/webservices/tuxedo/WSTuxedo.jws";

			Service service = new Service();
			Call call = (Call) service.createCall();

			call.setTargetEndpointAddress(new java.net.URL(endpoint));
			call.setOperationName(new QName("com/xyz/namespace/","callTuxedoService"));
			//call.setOperationName(new QName("http://soapinterop.org/","call"));
			

			String ret = (String) call.invoke(new Object[] { "TOUPPER","test" });

			System.out.println("BUFFER SORTIE=" + ret);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message