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 Tarus <pr...@gmail.com> on 2010/01/27 13:22:40 UTC

Axis2 DII client exception : Unexpected subelement arg0

Hello All,

I am facing a problem when is using DII client to invoke a webservice. 

Any help on this is appreciated.

Thanks in advance.


env:
-----
Axis 2.1.3, Tomcat 5.0, JDK 5.0


Trace is below:
log4j:WARN No appenders could be found for logger
(org.apache.axis2.description.AxisService).
log4j:WARN Please initialize the log4j system properly.
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement arg0
	at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
	at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
	at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
	at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
	at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
	at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
	at
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:99)
	at test.DynamicProxy.lsmsdynamicBlockInvocation(DynamicProxy.java:82)
	at test.DynamicProxy.main(DynamicProxy.java:207)

DII sample code:
--------------

RPCServiceClient svrClient = new RPCServiceClient(null, 
					 new URL("http://localhost:2323/TestServer/services/TestGateway?wsdl"),
					 new QName("http://sys.com/MyGW","TestGateway"),
					 "TestGatewaySoap");
			  
			Object params[] = new Object[]{"test"};
//			Object[] returnArray= svrClient.invokeBlocking(new
QName("http://sys.com/MyGW",
//												  "testMsgRecieve"), params,new Class[]{String.class});		
			Object[] returnArray= svrClient.invokeBlocking(new
QName("http://sys.com/MyGW",
			  "testMsgRecieve"), params,new Class[]{String.class});	
	

WSDL:
----------
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s0="http://wsproviders.mnp.Test.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://sys.com/MyGW" xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://sys.com/MyGW"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified"
targetNamespace="http://wsproviders.mnp.Test.com">
      <s:element name="testMsgReciever">
        <s:complexType>
          <s:sequence>
           
            <s:element minOccurs="1" maxOccurs="1" name="testRequest"
nillable="true" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="testMsgRecieverResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="return"
nillable="true" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
    <s:schema elementFormDefault="qualified"
targetNamespace="http://sys.com/MyGW">
      <s:element name="string" nillable="true" type="s:string" />
    </s:schema>
  </wsdl:types>
  <wsdl:message name="testMsgRecieverSoapIn">
    <wsdl:part name="parameters" element="s0:testMsgReciever" />
  </wsdl:message>
  <wsdl:message name="testMsgRecieverSoapOut">
    <wsdl:part name="parameters" element="s0:testMsgRecieverResponse" />
  </wsdl:message>
  <wsdl:message name="testMsgRecieverHttpGetIn">
   
    <wsdl:part name="testRequest" type="s:string" />
  </wsdl:message>
  <wsdl:message name="testMsgRecieverHttpGetOut">
    <wsdl:part name="Body" element="tns:string" />
  </wsdl:message>
  <wsdl:message name="testMsgRecieverHttpPostIn">

    <wsdl:part name="testRequest" type="s:string" />
  </wsdl:message>
  <wsdl:message name="testMsgRecieverHttpPostOut">
    <wsdl:part name="Body" element="tns:string" />
  </wsdl:message>
  <wsdl:portType name="TestGatewaySoap">
    <wsdl:operation name="testMsgReciever">
      <wsdl:input message="tns:testMsgRecieverSoapIn" />
      <wsdl:output message="tns:testMsgRecieverSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:portType name="TestGatewayHttpGet">
    <wsdl:operation name="testMsgReciever">
      <wsdl:input message="tns:testMsgRecieverHttpGetIn" />
      <wsdl:output message="tns:testMsgRecieverHttpGetOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:portType name="TestGatewayHttpPost">
    <wsdl:operation name="testMsgReciever">
      <wsdl:input message="tns:testMsgRecieverHttpPostIn" />
      <wsdl:output message="tns:testMsgRecieverHttpPostOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="TestGatewaySoap" type="tns:TestGatewaySoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="testMsgReciever">
      <soap:operation soapAction="urn:testMsgReciever" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="TestGatewaySoap12" type="tns:TestGatewaySoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="testMsgReciever">
      <soap12:operation soapAction="urn:testMsgReciever" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="TestGatewayHttpGet" type="tns:TestGatewayHttpGet">
    <http:binding verb="GET" />
    <wsdl:operation name="testMsgReciever">
      <http:operation location="/testMsgReciever" />
      <wsdl:input>
        <http:urlEncoded />
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="Body" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="TestGatewayHttpPost" type="tns:TestGatewayHttpPost">
    <http:binding verb="POST" />
    <wsdl:operation name="testMsgReciever">
      <http:operation location="/testMsgReciever" />
      <wsdl:input>
        <mime:content type="application/x-www-form-urlencoded" />
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="Body" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="TestGateway">
    <wsdl:port name="TestGatewaySoap" binding="tns:TestGatewaySoap">
      <soap:address location="http://localhost/TestGateway/TestGateway.asmx"
/>
    </wsdl:port>
    <wsdl:port name="TestGatewaySoap12" binding="tns:TestGatewaySoap12">
      <soap12:address
location="http://localhost/TestGateway/TestGateway.asmx" />
    </wsdl:port>
    <wsdl:port name="TestGatewayHttpGet" binding="tns:TestGatewayHttpGet">
      <http:address location="http://localhost/TestGateway/TestGateway.asmx"
/>
    </wsdl:port>
    <wsdl:port name="TestGatewayHttpPost" binding="tns:TestGatewayHttpPost">
      <http:address location="http://localhost/TestGateway/TestGateway.asmx"
/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
-- 
View this message in context: http://old.nabble.com/Axis2-DII-client-exception-%3A-Unexpected-subelement-arg0-tp27338174p27338174.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: Axis2 clustering error

Posted by Shailesh Potnis <po...@yahoo.com>.
It got resolved when I commented out the localMemberHost element.

 Thank You and Best Regards


Sincerely


Shailesh




________________________________
From: Shailesh Potnis <po...@yahoo.com>
To: axis-user@ws.apache.org
Sent: Mon, February 1, 2010 4:58:13 PM
Subject: Axis2 clustering error


Hi:

I am trying to get a better understanding of the following parameters and how to set them for Axis 2. 1.5 cluster:

mcastBindAddress

localMemberHost

I have set mcastBindAddress to 127.0.0.1 and localMemberHost to IP address of one of the hosts in the cluster.  (I tried to set localMemberHost to 127.0.0.1 as well but I get an error that it cannot bind to that address as well)  (I have hidden the actual IP address to protect confidential information)

I used WSO2 Carbon Cluster Configuration Language which indicated that localMemberHost should be set to a value other than localhost and may set it to the IP address bound to the network interface which is used for 
communicating with members in the group. (I am trying to determine what that address might be)  

http://wso2.org/library/articles/wso2-carbon-cluster-configuration-language

All helpful suggestions are highly appreciated.

I get the following error:
-----------------------------------------------------------------------------------

[INFO] Deploying JAXWS annotated class sample.jaxws.Version as a service - JAXWS
Version.VersionPort
[INFO] Initializing cluster...
[INFO] Cluster domain: apache.axis2.domain
[INFO] Using multicast based membership management scheme
Feb 1, 2010 3:56:07 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Unable to bind server socket to:/xx.xxx.xxx.xxx:4099 throwing error.
Feb 1, 2010 3:56:07 PM org.apache.catalina.tribes.transport.nio.NioReceiver star
t
SEVERE: Unable to start cluster receiver
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
119)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:205)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:217)
@

............................. additional stack omitted.
-----------------------------------------------------------------------------------


 Thank You and Best Regards


Sincerely


Shailesh


      

Axis2 clustering error

Posted by Shailesh Potnis <po...@yahoo.com>.
Hi:

I am trying to get a better understanding of the following parameters and how to set them for Axis 2. 1.5 cluster:

mcastBindAddress

localMemberHost

I have set mcastBindAddress to 127.0.0.1 and localMemberHost to IP address of one of the hosts in the cluster.  (I tried to set localMemberHost to 127.0.0.1 as well but I get an error that it cannot bind to that address as well)  (I have hidden the actual IP address to protect confidential information)

I used WSO2 Carbon Cluster Configuration Language which indicated that localMemberHost should be set to a value other than localhost and may set it to the IP address bound to the network interface which is used for 
communicating with members in the group. (I am trying to determine what that address might be)  

http://wso2.org/library/articles/wso2-carbon-cluster-configuration-language

All helpful suggestions are highly appreciated.

I get the following error:
-----------------------------------------------------------------------------------

[INFO] Deploying JAXWS annotated class sample.jaxws.Version as a service - JAXWS
Version.VersionPort
[INFO] Initializing cluster...
[INFO] Cluster domain: apache.axis2.domain
[INFO] Using multicast based membership management scheme
Feb 1, 2010 3:56:07 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Unable to bind server socket to:/xx.xxx.xxx.xxx:4099 throwing error.
Feb 1, 2010 3:56:07 PM org.apache.catalina.tribes.transport.nio.NioReceiver star
t
SEVERE: Unable to start cluster receiver
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
119)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:205)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:217)
        at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:217)
@

............................. additional stack omitted.
-----------------------------------------------------------------------------------


 Thank You and Best Regards


Sincerely


Shailesh


      

Re: Axis2 DII client exception : Unexpected subelement arg0

Posted by Tarus <pr...@gmail.com>.
Thanks for the response.
Same request works perfectly with generated code.

If there are any links that i can look in will be of great help.




Amila Suriarachchi wrote:
> 
> On Wed, Jan 27, 2010 at 5:52 PM, Tarus <pr...@gmail.com> wrote:
> 
>>
>> Hello All,
>>
>> I am facing a problem when is using DII client to invoke a webservice.
>>
>> Any help on this is appreciated.
>>
>> Thanks in advance.
>>
> 
> this seems to be a problem with the request message to send to the server.
> Try to access the server by generating the code for client side instead of
> using RPCServiceClient.
> 
> thanks,
> Amila.
> 
>>
>>
>> env:
>> -----
>> Axis 2.1.3, Tomcat 5.0, JDK 5.0
>>
>>
>> Trace is below:
>> log4j:WARN No appenders could be found for logger
>> (org.apache.axis2.description.AxisService).
>> log4j:WARN Please initialize the log4j system properly.
>> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
>> Unexpected subelement arg0
>>        at
>>
>> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>>        at
>>
>> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>>        at
>>
>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>>        at
>>
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>>        at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>>        at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>>        at
>>
>> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:99)
>>        at
>> test.DynamicProxy.lsmsdynamicBlockInvocation(DynamicProxy.java:82)
>>        at test.DynamicProxy.main(DynamicProxy.java:207)
>>
>> DII sample code:
>> --------------
>>
>> RPCServiceClient svrClient = new RPCServiceClient(null,
>>                                         new URL("
>> http://localhost:2323/TestServer/services/TestGateway?wsdl"),
>>                                         new QName("http://sys.com/MyGW
>> ","TestGateway"),
>>                                         "TestGatewaySoap");
>>
>>                        Object params[] = new Object[]{"test"};
>> //                      Object[] returnArray=
>> svrClient.invokeBlocking(new
>> QName("http://sys.com/MyGW",
>> //
>>                        "testMsgRecieve"), params,new
>> Class[]{String.class});
>>                        Object[] returnArray= svrClient.invokeBlocking(new
>> QName("http://sys.com/MyGW",
>>                          "testMsgRecieve"), params,new
>> Class[]{String.class});
>>
>>
>> WSDL:
>> ----------
>> <?xml version="1.0" encoding="utf-8"?>
>> <wsdl:definitions xmlns:s0="http://wsproviders.mnp.Test.com"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>> xmlns:tns="http://sys.com/MyGW"
>> xmlns:s="http://www.w3.org/2001/XMLSchema"
>> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> targetNamespace="http://sys.com/MyGW"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>>  <wsdl:types>
>>    <s:schema elementFormDefault="qualified"
>> targetNamespace="http://wsproviders.mnp.Test.com">
>>      <s:element name="testMsgReciever">
>>        <s:complexType>
>>          <s:sequence>
>>
>>            <s:element minOccurs="1" maxOccurs="1" name="testRequest"
>> nillable="true" type="s:string" />
>>          </s:sequence>
>>        </s:complexType>
>>      </s:element>
>>      <s:element name="testMsgRecieverResponse">
>>        <s:complexType>
>>          <s:sequence>
>>            <s:element minOccurs="1" maxOccurs="1" name="return"
>> nillable="true" type="s:string" />
>>          </s:sequence>
>>        </s:complexType>
>>      </s:element>
>>    </s:schema>
>>    <s:schema elementFormDefault="qualified"
>> targetNamespace="http://sys.com/MyGW">
>>      <s:element name="string" nillable="true" type="s:string" />
>>    </s:schema>
>>  </wsdl:types>
>>  <wsdl:message name="testMsgRecieverSoapIn">
>>    <wsdl:part name="parameters" element="s0:testMsgReciever" />
>>  </wsdl:message>
>>  <wsdl:message name="testMsgRecieverSoapOut">
>>    <wsdl:part name="parameters" element="s0:testMsgRecieverResponse" />
>>  </wsdl:message>
>>  <wsdl:message name="testMsgRecieverHttpGetIn">
>>
>>    <wsdl:part name="testRequest" type="s:string" />
>>  </wsdl:message>
>>  <wsdl:message name="testMsgRecieverHttpGetOut">
>>    <wsdl:part name="Body" element="tns:string" />
>>  </wsdl:message>
>>  <wsdl:message name="testMsgRecieverHttpPostIn">
>>
>>    <wsdl:part name="testRequest" type="s:string" />
>>  </wsdl:message>
>>  <wsdl:message name="testMsgRecieverHttpPostOut">
>>    <wsdl:part name="Body" element="tns:string" />
>>  </wsdl:message>
>>  <wsdl:portType name="TestGatewaySoap">
>>    <wsdl:operation name="testMsgReciever">
>>      <wsdl:input message="tns:testMsgRecieverSoapIn" />
>>      <wsdl:output message="tns:testMsgRecieverSoapOut" />
>>    </wsdl:operation>
>>  </wsdl:portType>
>>  <wsdl:portType name="TestGatewayHttpGet">
>>    <wsdl:operation name="testMsgReciever">
>>      <wsdl:input message="tns:testMsgRecieverHttpGetIn" />
>>      <wsdl:output message="tns:testMsgRecieverHttpGetOut" />
>>    </wsdl:operation>
>>  </wsdl:portType>
>>  <wsdl:portType name="TestGatewayHttpPost">
>>    <wsdl:operation name="testMsgReciever">
>>      <wsdl:input message="tns:testMsgRecieverHttpPostIn" />
>>      <wsdl:output message="tns:testMsgRecieverHttpPostOut" />
>>    </wsdl:operation>
>>  </wsdl:portType>
>>  <wsdl:binding name="TestGatewaySoap" type="tns:TestGatewaySoap">
>>    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
>>    <wsdl:operation name="testMsgReciever">
>>      <soap:operation soapAction="urn:testMsgReciever" style="document" />
>>      <wsdl:input>
>>        <soap:body use="literal" />
>>      </wsdl:input>
>>      <wsdl:output>
>>        <soap:body use="literal" />
>>      </wsdl:output>
>>    </wsdl:operation>
>>  </wsdl:binding>
>>  <wsdl:binding name="TestGatewaySoap12" type="tns:TestGatewaySoap">
>>    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
>>    <wsdl:operation name="testMsgReciever">
>>      <soap12:operation soapAction="urn:testMsgReciever" style="document"
>> />
>>      <wsdl:input>
>>        <soap12:body use="literal" />
>>      </wsdl:input>
>>      <wsdl:output>
>>        <soap12:body use="literal" />
>>      </wsdl:output>
>>    </wsdl:operation>
>>  </wsdl:binding>
>>  <wsdl:binding name="TestGatewayHttpGet" type="tns:TestGatewayHttpGet">
>>    <http:binding verb="GET" />
>>    <wsdl:operation name="testMsgReciever">
>>      <http:operation location="/testMsgReciever" />
>>      <wsdl:input>
>>        <http:urlEncoded />
>>      </wsdl:input>
>>      <wsdl:output>
>>        <mime:mimeXml part="Body" />
>>      </wsdl:output>
>>    </wsdl:operation>
>>  </wsdl:binding>
>>  <wsdl:binding name="TestGatewayHttpPost" type="tns:TestGatewayHttpPost">
>>    <http:binding verb="POST" />
>>    <wsdl:operation name="testMsgReciever">
>>      <http:operation location="/testMsgReciever" />
>>      <wsdl:input>
>>        <mime:content type="application/x-www-form-urlencoded" />
>>      </wsdl:input>
>>      <wsdl:output>
>>        <mime:mimeXml part="Body" />
>>      </wsdl:output>
>>    </wsdl:operation>
>>  </wsdl:binding>
>>  <wsdl:service name="TestGateway">
>>    <wsdl:port name="TestGatewaySoap" binding="tns:TestGatewaySoap">
>>      <soap:address
>> location="http://localhost/TestGateway/TestGateway.asmx
>> "
>> />
>>    </wsdl:port>
>>    <wsdl:port name="TestGatewaySoap12" binding="tns:TestGatewaySoap12">
>>      <soap12:address
>> location="http://localhost/TestGateway/TestGateway.asmx" />
>>    </wsdl:port>
>>    <wsdl:port name="TestGatewayHttpGet" binding="tns:TestGatewayHttpGet">
>>      <http:address
>> location="http://localhost/TestGateway/TestGateway.asmx
>> "
>> />
>>    </wsdl:port>
>>    <wsdl:port name="TestGatewayHttpPost"
>> binding="tns:TestGatewayHttpPost">
>>      <http:address
>> location="http://localhost/TestGateway/TestGateway.asmx
>> "
>> />
>>    </wsdl:port>
>>  </wsdl:service>
>> </wsdl:definitions>
>> --
>> View this message in context:
>> http://old.nabble.com/Axis2-DII-client-exception-%3A-Unexpected-subelement-arg0-tp27338174p27338174.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
> 
> 

-- 
View this message in context: http://old.nabble.com/Axis2-DII-client-exception-%3A-Unexpected-subelement-arg0-tp27338174p27400265.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: Axis2 DII client exception : Unexpected subelement arg0

Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Jan 27, 2010 at 5:52 PM, Tarus <pr...@gmail.com> wrote:

>
> Hello All,
>
> I am facing a problem when is using DII client to invoke a webservice.
>
> Any help on this is appreciated.
>
> Thanks in advance.
>

this seems to be a problem with the request message to send to the server.
Try to access the server by generating the code for client side instead of
using RPCServiceClient.

thanks,
Amila.

>
>
> env:
> -----
> Axis 2.1.3, Tomcat 5.0, JDK 5.0
>
>
> Trace is below:
> log4j:WARN No appenders could be found for logger
> (org.apache.axis2.description.AxisService).
> log4j:WARN Please initialize the log4j system properly.
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> Unexpected subelement arg0
>        at
>
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>        at
>
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>        at
>
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>        at
>
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>        at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>        at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>        at
>
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:99)
>        at
> test.DynamicProxy.lsmsdynamicBlockInvocation(DynamicProxy.java:82)
>        at test.DynamicProxy.main(DynamicProxy.java:207)
>
> DII sample code:
> --------------
>
> RPCServiceClient svrClient = new RPCServiceClient(null,
>                                         new URL("
> http://localhost:2323/TestServer/services/TestGateway?wsdl"),
>                                         new QName("http://sys.com/MyGW
> ","TestGateway"),
>                                         "TestGatewaySoap");
>
>                        Object params[] = new Object[]{"test"};
> //                      Object[] returnArray= svrClient.invokeBlocking(new
> QName("http://sys.com/MyGW",
> //
>                        "testMsgRecieve"), params,new Class[]{String.class});
>                        Object[] returnArray= svrClient.invokeBlocking(new
> QName("http://sys.com/MyGW",
>                          "testMsgRecieve"), params,new
> Class[]{String.class});
>
>
> WSDL:
> ----------
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions xmlns:s0="http://wsproviders.mnp.Test.com"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:tns="http://sys.com/MyGW" xmlns:s="http://www.w3.org/2001/XMLSchema"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> targetNamespace="http://sys.com/MyGW"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>  <wsdl:types>
>    <s:schema elementFormDefault="qualified"
> targetNamespace="http://wsproviders.mnp.Test.com">
>      <s:element name="testMsgReciever">
>        <s:complexType>
>          <s:sequence>
>
>            <s:element minOccurs="1" maxOccurs="1" name="testRequest"
> nillable="true" type="s:string" />
>          </s:sequence>
>        </s:complexType>
>      </s:element>
>      <s:element name="testMsgRecieverResponse">
>        <s:complexType>
>          <s:sequence>
>            <s:element minOccurs="1" maxOccurs="1" name="return"
> nillable="true" type="s:string" />
>          </s:sequence>
>        </s:complexType>
>      </s:element>
>    </s:schema>
>    <s:schema elementFormDefault="qualified"
> targetNamespace="http://sys.com/MyGW">
>      <s:element name="string" nillable="true" type="s:string" />
>    </s:schema>
>  </wsdl:types>
>  <wsdl:message name="testMsgRecieverSoapIn">
>    <wsdl:part name="parameters" element="s0:testMsgReciever" />
>  </wsdl:message>
>  <wsdl:message name="testMsgRecieverSoapOut">
>    <wsdl:part name="parameters" element="s0:testMsgRecieverResponse" />
>  </wsdl:message>
>  <wsdl:message name="testMsgRecieverHttpGetIn">
>
>    <wsdl:part name="testRequest" type="s:string" />
>  </wsdl:message>
>  <wsdl:message name="testMsgRecieverHttpGetOut">
>    <wsdl:part name="Body" element="tns:string" />
>  </wsdl:message>
>  <wsdl:message name="testMsgRecieverHttpPostIn">
>
>    <wsdl:part name="testRequest" type="s:string" />
>  </wsdl:message>
>  <wsdl:message name="testMsgRecieverHttpPostOut">
>    <wsdl:part name="Body" element="tns:string" />
>  </wsdl:message>
>  <wsdl:portType name="TestGatewaySoap">
>    <wsdl:operation name="testMsgReciever">
>      <wsdl:input message="tns:testMsgRecieverSoapIn" />
>      <wsdl:output message="tns:testMsgRecieverSoapOut" />
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:portType name="TestGatewayHttpGet">
>    <wsdl:operation name="testMsgReciever">
>      <wsdl:input message="tns:testMsgRecieverHttpGetIn" />
>      <wsdl:output message="tns:testMsgRecieverHttpGetOut" />
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:portType name="TestGatewayHttpPost">
>    <wsdl:operation name="testMsgReciever">
>      <wsdl:input message="tns:testMsgRecieverHttpPostIn" />
>      <wsdl:output message="tns:testMsgRecieverHttpPostOut" />
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:binding name="TestGatewaySoap" type="tns:TestGatewaySoap">
>    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
>    <wsdl:operation name="testMsgReciever">
>      <soap:operation soapAction="urn:testMsgReciever" style="document" />
>      <wsdl:input>
>        <soap:body use="literal" />
>      </wsdl:input>
>      <wsdl:output>
>        <soap:body use="literal" />
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:binding name="TestGatewaySoap12" type="tns:TestGatewaySoap">
>    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
>    <wsdl:operation name="testMsgReciever">
>      <soap12:operation soapAction="urn:testMsgReciever" style="document" />
>      <wsdl:input>
>        <soap12:body use="literal" />
>      </wsdl:input>
>      <wsdl:output>
>        <soap12:body use="literal" />
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:binding name="TestGatewayHttpGet" type="tns:TestGatewayHttpGet">
>    <http:binding verb="GET" />
>    <wsdl:operation name="testMsgReciever">
>      <http:operation location="/testMsgReciever" />
>      <wsdl:input>
>        <http:urlEncoded />
>      </wsdl:input>
>      <wsdl:output>
>        <mime:mimeXml part="Body" />
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:binding name="TestGatewayHttpPost" type="tns:TestGatewayHttpPost">
>    <http:binding verb="POST" />
>    <wsdl:operation name="testMsgReciever">
>      <http:operation location="/testMsgReciever" />
>      <wsdl:input>
>        <mime:content type="application/x-www-form-urlencoded" />
>      </wsdl:input>
>      <wsdl:output>
>        <mime:mimeXml part="Body" />
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:service name="TestGateway">
>    <wsdl:port name="TestGatewaySoap" binding="tns:TestGatewaySoap">
>      <soap:address location="http://localhost/TestGateway/TestGateway.asmx
> "
> />
>    </wsdl:port>
>    <wsdl:port name="TestGatewaySoap12" binding="tns:TestGatewaySoap12">
>      <soap12:address
> location="http://localhost/TestGateway/TestGateway.asmx" />
>    </wsdl:port>
>    <wsdl:port name="TestGatewayHttpGet" binding="tns:TestGatewayHttpGet">
>      <http:address location="http://localhost/TestGateway/TestGateway.asmx
> "
> />
>    </wsdl:port>
>    <wsdl:port name="TestGatewayHttpPost" binding="tns:TestGatewayHttpPost">
>      <http:address location="http://localhost/TestGateway/TestGateway.asmx
> "
> />
>    </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
> --
> View this message in context:
> http://old.nabble.com/Axis2-DII-client-exception-%3A-Unexpected-subelement-arg0-tp27338174p27338174.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/