You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Gauba, Naveen" <c_...@qualcomm.com> on 2008/03/10 21:59:26 UTC

Clarification on WSDL2JAVA

> Hi All
> 
> I have a method getInfo in my WSDL that does not take any input parameters. The WSDL snippet is pasted below.
> 
> 	<wsdl:message name="getInfoMessage" />
> 	<wsdl:message name="getInfoResponse"><wsdl:part name="part1" element="ns2:getInfoResponse" /></wsdl:message>
> 
> I generated the Client Stub using the WSDL2JAVA Ant Task. In the SOAPBindingStub (that implements org.apache.axis.client.Stub). When I look at the method definition for the getInfo method I see that the operation name was not set onto the Call object. See code snippet below.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> getInfo() throws java.rmi.RemoteException {
>         if (super.cachedEndpoint == null) {
>             throw new org.apache.axis.NoEndPointException();
>         }
>         org.apache.axis.client.Call _call = createCall();
>         _call.setOperation(_operations[2]);
>         _call.setUseSOAPAction(true);
>         _call.setSOAPActionURI("urn:getInfo");
>         _call.setEncodingStyle(null);
>         _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
>         _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
>         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
>         setRequestHeaders(_call);
>         setAttachments(_call);
>  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {});
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Ideally there should have been one more line of code like this in the generated code
> 
> 	_call.setOperationName(new javax.xml.namespace.QName("http://abc.qualcomm.com/xsd", "getInfo"));
> 
> When I call this method using my Java client I get this AxisFault, the stack trace is pasted below.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Exception in thread "main" AxisFault 
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException 
> faultSubcode: 
> faultString: No operation name specified! 
> faultActor: 
> faultNode: 
> faultDetail: 
> {http://xml.apache.org/axis/}stackTrace:No operation name specified! 
> at org.apache.axis.client.Call.invoke(Call.java:1809) 
> at com.qualcomm.abc.CatalogQueryWSSOAP11BindingStub.getInfo(CatalogQueryWSSOAP11BindingStub.java:349) 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> My question is, Should I report this issue against Axis or against some other project? Please help.
> 
> thanks
>  
> Naveen Gauba
>