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"/>
</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