axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: wsdl2java does not generate code when http binding is used
Date Thu, 15 Mar 2007 05:32:09 GMT
Are you using Axis2 1.1.1? try to use the a nightly build. Recently I added
the http binding to axis2.


On 3/14/07, Yadav, Yogendra (IT) <Yogendra.Yadav@morganstanley.com> wrote:
>
>  Hi,
> When I use http style binding in WSDL instead of soap binding, the
> wsdl2java tool could not generate code. Comments from generated stub code
> *Unknown style detected !! No code is generated*.
>
> The WSDL snippet:
> ----------------------------
> <binding name="XSDJAXBServicePortBinding"
> type="tns:XSDJAXBServicePortType">
>     <http:binding verb="POST"/>
>     <operation name="serviceMethod">
>       <http:operation location="sm"/>
>          <input>
>              <mime:content type="application/x-www-form-urlencoded"/>
>          </input>
>          <output>
>             <mime:content type="application/x-www-form-urlencoded"/>
>          </output>
>    </operation>
>  </binding>
>  <service name="XSDJAXBService">
>     <port name="XSDJAXBServicePort"
> binding="tns:XSDJAXBServicePortBinding">
>        <http:address location="
> http://localhost:8080/axis2/services/XSDJAXBService"/<http://localhost:8080/axis2/services/XSDJAXBService%22/>
> >
>     </port>
>  </service>
> wsdl2java command line:
>  -------------------------------------
> wsdl2java -d jaxbri -p com.xsd.input -ss -sd -g -uri DocumentService.wsdl-pn XSDJAXBServicePort
>
> comments from generated stub class:
>  --------------------------------------------------------
>   public void serviceMethod(
>
>   ) throws java.rmi.RemoteException
>
>   {
>     try
>     {
>       org.apache.axis2.client.OperationClient _operationClient =
> _serviceClient
>           .createClient( _operations[0].getName() );
>       _operationClient.getOptions().setAction( "urn:serviceMethod" );
>       _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
> true );
>
>       // create SOAP envelope with that payload
>       org.apache.axiom.soap.SOAPEnvelope env = null;
>
>       // Unknown style detected !! No code is generated
>
>       // adding SOAP headers
>       _serviceClient.addHeadersToEnvelope( env );
>       // create message context with that soap envelope
>       org.apache.axis2.context.MessageContext _messageContext = new
> org.apache.axis2.context.MessageContext();
>       _messageContext.setEnvelope( env );
>
>       // add the message contxt to the operation client
>       _operationClient.addMessageContext( _messageContext );
>
>       // execute the operation client
>       _operationClient.execute( true );
>
>       return;
>
>     }
>
> Please tell me if I am doing something wrong.
>
> thanx
> -yogen
>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message