File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes how to form Soap 1.2 version action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to form Soap 1.2 version action" Watch "how to form Soap 1.2 version action" New topic
Author

how to form Soap 1.2 version action

Kannaiah Esunuru
Greenhorn

Joined: Nov 22, 2009
Posts: 3
Hi All,
I want to inetarct with Webservice thru saop action wsdl fro Oracle.
My Soap 1.2 request is like below.
"<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:sch="http://www.example.org/timeouts"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<soap:Header/>
<soap:Body>
<sch:clientRequest>
<env:EaiEnvelope>
<env:Service>ServiceRequestResponse</env:Service>
<env:Payload>
<inp:ServiceRequestResponse>
<ServiceRequest>
<ns0:ServiceOrderType>MODIFY_SUBSCRIBER</ns0:ServiceOrderType>
<ns0:TransactionId>ABL000000000123</ns0:TransactionId>
<ns0:ApplicationKeys>
<ns0:ApplicationKey>
<ns0:Name>IMSI</ns0:Name>
<ns0:Value>"112270000000631"</ns0:Value>
</ns0:ApplicationKey>
<ns0:ApplicationKey>
<ns0:Name>MSISDN</ns0:Name>
<ns0:Value>"1099086"</ns0:Value>
</ns0:ApplicationKey>
</ns0:ApplicationKeys>
<ns0:Priority>1</ns0:Priority>
<ns0:SOData>
<ns0:CurrentServices>
<ns0:ServiceDescription ServiceTag="SUBSCRIBER">
<ns0:ParameterDesc ParameterTag="IMSI" ParameterValue="112270000000631"/>
<ns0:ParameterDesc ParameterTag="MSISDN" ParameterValue="1099086"/>
<ns0:ParameterDesc ParameterTag="TemplateID" ParameterValue="1"/>
<ns0:ParameterDesc ParameterTag="PackageId" ParameterValue="1019"/>
<ns0:ParameterDesc ParameterTag="Lang" ParameterValue="English"/>
<ns0:ParameterDesc ParameterTag="PaidMode" ParameterValue="Postpaid"/>
<ns0:ParameterDesc ParameterTag="InitialCredit" ParameterValue="1000"/>
</ns0:ServiceDescription>
</ns0:CurrentServices>
<ns0:RequiredServices>
<ns0:ServiceDescription ServiceTag="SUBSCRIBER">
<ns0:ParameterDesc ParameterTag="IMSI" ParameterValue="112270000000631"/>
<ns0:ParameterDesc ParameterTag="MSISDN" ParameterValue="1099086"/>
<ns0:ParameterDesc ParameterTag="TemplateID" ParameterValue="1"/>
<ns0:ParameterDesc ParameterTag="PackageId" ParameterValue="1019"/>
<ns0:ParameterDesc ParameterTag="Lang" ParameterValue="English"/>
<ns0:ParameterDesc ParameterTag="PaidMode" ParameterValue="Postpaid"/>
<ns0:ParameterDesc ParameterTag="InitialCredit" ParameterValue="1000"/>
</ns0:ServiceDescription>
<ns0:ServiceDescription ServiceTag="CFWNRCH"/>
</ns0:RequiredServices>
</ns0:SOData>
</ServiceRequest>
</inp:ServiceRequestResponse>
</env:Payload>
</env:EaiEnvelope>
</sch:clientRequest>
</soap:Body>
</soap:Envelope>"

But i am getting error like Version mismatch.
Response is like below.

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
<wsa:RelatesTo>urn:uuid:12837ECA7AE707C2CA1258740040239</wsa:RelatesTo>
</soapenv:Header><soapenv:Body><soapenv:Fault><faultcode>env:VersionMismatch</faultcode>
<faultstring>Transport level information does not match with SOAP Message namespace URI</faultstring><detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>


Can any one please help wht is wrong in that XML.

It is little bit urgent.

Thanks in advance.

Regds
Kannaiah
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
How are you generating that SOAP? The usual way would be to use a tool that comes with your SOAP stack (possibly called wsdl2java or some such) to generate Java client classes, and then to use those to interact with the WS.


Ping & DNS - updated with new look and Ping home screen widget
Kannaiah Esunuru
Greenhorn

Joined: Nov 22, 2009
Posts: 3
Hi,
Thanks for your reply.
Actualy i am generating from oracle. I just want to connect webservice which will accept soap v 1.2 thru our local server.

Means actual server is in some other country. we are connecting that onsite server thru proxy.

I am using inbuild package UTL_HTTP post method from oracle.
I able to generate XML in which is header and tags are configurable means hard coded in code. But tag values we are taking from database.

Regds
Kannaiah

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
I able to generate XML in which is header and tags are configurable means hard coded in code.

It seems that that's the problem. The XML/SOAP that's being generated is not what the service expects. That's why it's preferable to have the SOAP created by the toolkit; the eaisest way to get there is to point your favorite WSDL-2-Java tool at the WSDL of the target WS, and have it generate the code for you.
Kannaiah Esunuru
Greenhorn

Joined: Nov 22, 2009
Posts: 3
Hi,
My requirement is " Thru the oracle i need to call WS"
I can not use any tool to generate Soap XML.

Can you tell me wht is wrong in request XML. If any thing need to chage, Please let me know.

Thnaks

Regds
Kannaiah
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
My requirement is " Thru the oracle i need to call WS"

That says nothing about how you create the code that calls the WS, and it shouldn't.

I can not use any tool to generate Soap XML.

Why not? Note that I'm not advocating to use a tool to access the WS - I'm advocating to use a tool to create the client code that accesses the WS; it would be used during development, not at runtime.

Can you tell me wht is wrong in request XML.

No, we can't, because we know nothing about the WS in question. If you don't have proper documentation, you'll need at least the WSDL of that WS in order to access it successfully.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to form Soap 1.2 version action
 
Similar Threads
WAS v6.1 + WS-Security
Customize AXISFault before reaching the Operation
Axis2, client handler not getting called
BPEL eclipse designer and Apache ODE: The [action] cannot be processed at the receiver
BPEL eclipse designer and Apache ODE