aspose file tools*
The moose likes Web Services and the fly likes Axis and document-literal style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis and document-literal style" Watch "Axis and document-literal style" New topic
Author

Axis and document-literal style

henri delbrouck
Greenhorn

Joined: Jul 12, 2004
Posts: 7
With Tomcat 5.0.28 and Axis 1.2RC3, I try to send document-literal XML message to a web service but get the following error message: No such operation.
The XML message sent is:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<action xmlns="http://ww.xx.yy.zz">add</action>
<year xmlns="http://ww.xx.yy.zz">8</year>
</soapenv:Body>
</soapenv:Envelope>

The service Endpoint contains the following method:

public String myMethod(String x, int y)

It seems that Axis can not do the XML-Java mapping as the message does not contain the method name (since it is document literal style).

Could somebody help me what to do to solve this problem ?

Is it necessary to define a server method which use JavaBeans ?

Thanks in advance
Amit G Piplani
Ranch Hand

Joined: Jul 21, 2004
Posts: 83
Try debugging it using XMLSPY or you can paste your wsdl here?


SCJP,SCWCD,SCBCD,SCDJWS1.4, SCDJWS1.5
henri delbrouck
Greenhorn

Joined: Jul 12, 2004
Posts: 7
Hello,

Here is my wsdd:
<service name="ImportLicenceReq" provider="java:RPC" style="document" use="literal">
<parameter name="wsdlTargetNamespace" value="http://sigl2.trade.cec.eu"/>
<parameter name="wsdlServiceElement" value="ImportLicenceReqService"/>
<parameter name="wsdlServicePort" value="ImportLicenceReq"/>
<parameter name="className" value="eu.cec.trade.sigl2.services.ImportLicenceReqImpl"/>
<parameter name="wsdlPortType" value="ImportLicenceReq"/>
<parameter name="typeMappingVersion" value="1.2"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="Session"/>
</service>

Here is my wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions targetNamespace="sigl2.trade.cec.eu" xmlns:impl="sigl2.trade.cec.eu" xmlns:intf="sigl2.trade.cec.eu" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.2RC3
Built on Feb 28, 2005 (10:15:14 EST)-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="sigl2.trade.cec.eu" elementFormDefault="qualified">
<element name="action" type="xsd:string"/>
<element name="quotaYear" type="xsd:int"/>
<element name="SendLicenceReturn" type="xsd:string"/>
</schema>
</wsdl:types>

<wsdl:message name="SendLicenceRequest">

<wsdl art name="action" element="impl:action"/>

<wsdl art name="quotaYear" element="impl:quotaYear"/>

</wsdl:message>

<wsdl:message name="SendLicenceResponse">

<wsdl art name="SendLicenceReturn" element="impl:SendLicenceReturn"/>

</wsdl:message>

<wsdl ortType name="ImportLicenceReqImpl">

<wsdl peration name="SendLicence" parameterOrder="action quotaYear">

<wsdl:input name="SendLicenceRequest" message="impl:SendLicenceRequest"/>

<wsdl utput name="SendLicenceResponse" message="impl:SendLicenceResponse"/>

</wsdl peration>

</wsdl ortType>

<wsdl:binding name="euSoapBinding" type="impl:ImportLicenceReqImpl">

<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl peration name="SendLicence">

<wsdlsoap peration soapAction=""/>

<wsdl:input name="SendLicenceRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl utput name="SendLicenceResponse">

<wsdlsoap:body use="literal"/>

</wsdl utput>

</wsdl peration>

</wsdl:binding>

<wsdl:service name="ImportLicenceReqImplService">

<wsdl ort name="eu" binding="impl:euSoapBinding">

<wsdlsoap:address location="http://localhost:8080/sigl2/trade/cec/eu"/>

</wsdl ort>

</wsdl:service>

</wsdl efinitions>


Thank you for any help

Henri Delbrouck
 
Consider Paul's rocket mass heater.
 
subject: Axis and document-literal style