Can you post your WSDL? How are you invoking the webservice? DII? generated
Stubs?
- Junaid
"Wagh, Shrikant"
<[EMAIL PROTECTED]
.com> To
<[EMAIL PROTECTED]>,
12/02/2003 05:13 <[EMAIL PROTECTED]>
PM cc
Subject
Please respond to Please help: How to invoke intended
[EMAIL PROTECTED] operation when the multiple
he.org Message-style operations are
defined in one WSDL and served by
the single endpoint location URL
Hi Axis users and developers,
I'm facing a very unique issue and any help, suggestion pointers to resolve
this would be highly appreciated.
Context of the issue
----------------------------
I have 6 operations (web services) in one WSDL. All these web services are
deployed as Axis-Message style services. All of these web services takes
Document as input and returns the document. Following are the method
signatures I have for these web services.
1. public Document createProfile(Document body);
2. public Document updateProfile(Document body);
3. public Document retrieveProfile(Document body);
4. public Document retrieveTemplate(Document body);
5. public Document retrieveTemplateAndProfile(Document body);
Here is the server-config.wsdd file excerpts for these services.
<service name="EProfileService" provider="java:MSG" style="message"
use="literal">
<parameter name="wsdlTargetNamespace" value="
http://eprofile.globalops.hp.com"/>
<parameter name="wsdlServiceElement"
value="EProfileServiceService"/>
<parameter name="wsdlServicePort" value="EProfileService"/>
<parameter name="className"
value="com.hp.eprofile.EProfileSoapBindingImpl"/>
<parameter name="wsdlPortType" value="EProfileService"/>
<operation name="createProfile" qname="operNS:createProfile"
xmlns:operNS="http://eprofile.globalops.hp.com"
returnQName="retNS:createProfileReturn" xmlns:retNS="
http://eprofile.globalops.hp.com/eProfileService"
returnType="rtns:Document" xmlns:rtns="http://xml.apache.org/xml-soap" >
<parameter qname="pns:createProfile" xmlns:pns="
http://eprofile.globalops.hp.com/eProfileService" type="tns:Document"
xmlns:tns="http://xml.apache.org/xml-soap"/>
</operation>
<operation name="updateProfile" qname="operNS:updateProfile"
xmlns:operNS="http://eprofile.globalops.hp.com"
returnQName="retNS:updateProfileReturn" xmlns:retNS="
http://eprofile.globalops.hp.com/eProfileService"
returnType="rtns:Document" xmlns:rtns="http://xml.apache.org/xml-soap" >
<parameter qname="pns:updateProfile" xmlns:pns="
http://eprofile.globalops.hp.com/eProfileService" type="tns:Document"
xmlns:tns="http://xml.apache.org/xml-soap"/>
</operation>
<operation name="retrieveProfile" qname="operNS:retrieveProfile"
xmlns:operNS="http://eprofile.globalops.hp.com"
returnQName="retNS:retrieveProfileReturn" xmlns:retNS="
http://eprofile.globalops.hp.com/eProfileService"
returnType="rtns:Document" xmlns:rtns="http://xml.apache.org/xml-soap" >
<parameter qname="pns:retrieveProfile" xmlns:pns="
http://eprofile.globalops.hp.com/eProfileService" type="tns:Document"
xmlns:tns="http://xml.apache.org/xml-soap"/>
</operation>
<operation name="retrieveTemplate" qname="operNS:retrieveTemplate"
xmlns:operNS="http://eprofile.globalops.hp.com"
returnQName="retNS:retrieveTemplateReturn" xmlns:retNS="
http://eprofile.globalops.hp.com/eProfileService"
returnType="rtns:Document" xmlns:rtns="http://xml.apache.org/xml-soap" >
<parameter qname="pns:retrieveTemplate" xmlns:pns="
http://eprofile.globalops.hp.com/eProfileService" type="tns:Document"
xmlns:tns="http://xml.apache.org/xml-soap"/>
</operation>
<operation name="retrieveTemplateAndProfile"
qname="operNS:retrieveTemplateAndProfile" xmlns:operNS="
http://eprofile.globalops.hp.com/retrieveTemplateAndProfile"
returnQName="retNS:retrieveTemplateAndProfileReturn" xmlns:retNS="
http://eprofile.globalops.hp.com/eProfileService"
returnType="rtns:Document" xmlns:rtns="http://xml.apache.org/xml-soap" >
<parameter qname="pns:ApplicationTemplateChecksum" xmlns:pns="
http://eprofile.globalops.hp.com/eProfileService" type="tns:Document"
xmlns:tns="http://xml.apache.org/xml-soap"/>
</operation>
<operation name="checkTemplate" qname="operNS:checkTemplate"
xmlns:operNS="http://eprofile.globalops.hp.com"
returnQName="retNS:checkTemplateReturn" xmlns:retNS="
http://eprofile.globalops.hp.com/eProfileService"
returnType="rtns:Document" xmlns:rtns="http://xml.apache.org/xml-soap" >
<parameter qname="pns:checkTemplate" xmlns:pns="
http://eprofile.globalops.hp.com/eProfileService" type="tns:Document"
xmlns:tns="http://xml.apache.org/xml-soap"/>
</operation>
<parameter name="allowedMethods" value="checkTemplate
retrieveTemplate createProfile updateProfile retrieveProfile
retrieveTemplateAndProfile"/>
</service>
Problem Statement
---------------------------
My problem is, if I use the axis client then I'm not able to invoke the
intended operation. As per WSDL 1.1 specification section #3.5, the request
for doc lit the input data is wrapped in the message-part name element and
it appears in the body of the request. If I do this, then I'm able to
invoke the intended operation. But the Axis Client does not wrap the input
in message-part name element. Any help/suggestions in resolving the
following issues are much appreciated.
1. How can I make my DII client to invoke the intended operation? 2. Why
Axis does not follow the WSDL 1.1 specification section #3.5 and wraps the
input in message part name (see the sample request by Axis and the correct
request which is able to invoke the service, at the end of this email) 3.
Is there any workaround, other than specifying each operation in a separate
WSDL and deploy those as different endpoint. i.e. one operation one WSDL,
one operation each endpoint. 4. Specifying the SOAPAction for operation
does not work in Axis, Looks like this is and Axis limitation. I even saw
the excerpts of the Axis source code posted by one of the user, which does
not handle the SOAPAction. What are my other alternatives.
Here is the sample request which can invoke the intended operation.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns1:eProfileHeader xmlns:ns1="
http://eprofile.globalops.hp.com/eProfileService
"><ApplicationID>AppID</ApplicationID><LanguageCode>LangID</LanguageCode><HPPID>HppID</HPPID><SiteMinderSID>SID</SiteMinderSID><TemplateID>DummyTemplateID</TemplateID></ns1:eProfileHeader>
</SOAP-ENV:Header> <SOAP-ENV:Body>
<checkTemplate xmlns="http://eprofile.globalops.hp.com/eProfileService
"><ApplicationTemplateChecksum>
<TemplateChecksum>2003-11-14T16:44:50.633Z</TemplateChecksum>
</ApplicationTemplateChecksum></checkTemplate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is how the request generated by Axis client, which fails to invoke the
intended operation
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><ns1:eProfileHeader xmlns:ns1="
http://eprofile.globalops.hp.com/eProfileService
"><ApplicationID>AppID</ApplicationID><LanguageCode>LangID</LanguageCode><HPPID>HppID</HPPID><SiteMinderSID>SID</SiteMinderSID><TemplateID>DummyTemplateID</TemplateID></ns1:eProfileHeader>
</SOAP-ENV:Header> <SOAP-ENV:Body>
<ApplicationTemplateChecksum>
<TemplateChecksum>2003-11-14T16:44:50.633Z</TemplateChecksum>
</ApplicationTemplateChecksum>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Any way, either by modifying the WSDD, or any change on the client side, or
any other possible way by which I can invoke the intended operation of
message style, where the multiple operations are served by single endpoint
location.
Thanks in advance.
Shrikant Wagh
HPP/eProfile QA Lead
HP