This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis and document-literal style" Watch "Axis and document-literal style" New topic

Axis and document-literal style

henri delbrouck

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="" xmlns:xsd="" xmlns:xsi="">
<action xmlns="http://ww.xx.yy.zz">add</action>
<year xmlns="http://ww.xx.yy.zz">8</year>

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?

henri delbrouck

Joined: Jul 12, 2004
Posts: 7

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

Here is my wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions targetNamespace="" xmlns:impl="" xmlns:intf="" xmlns:apachesoap="" xmlns:wsdlsoap="" xmlns:xsd="" xmlns:wsdl="">
<!--WSDL created by Apache Axis version: 1.2RC3
Built on Feb 28, 2005 (10:15:14 EST)-->
<schema xmlns="" targetNamespace="" elementFormDefault="qualified">
<element name="action" type="xsd:string"/>
<element name="quotaYear" type="xsd:int"/>
<element name="SendLicenceReturn" type="xsd:string"/>

<wsdl:message name="SendLicenceRequest">

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

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


<wsdl:message name="SendLicenceResponse">

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


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

<wsdl peration name="SendLicence">

<wsdlsoap peration soapAction=""/>

<wsdl:input name="SendLicenceRequest">

<wsdlsoap:body use="literal"/>


<wsdl utput name="SendLicenceResponse">

<wsdlsoap:body use="literal"/>

</wsdl utput>

</wsdl peration>


<wsdl:service name="ImportLicenceReqImplService">

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

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

</wsdl ort>


</wsdl efinitions>

Thank you for any help

Henri Delbrouck
Have you checked out Aspose?
subject: Axis and document-literal style
It's not a secret anymore!