Author |
Message
|
broker sycho |
Posted: Mon Oct 05, 2009 5:52 pm Post subject: rpc to document based message creation through ESQL |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
We have a requirement to support two wsdls, rpc based and document based.
Our organization internally has rpc based wsdl while producer has document based wsdl. So we are building an interface in which we are accepting rpc based soap message and then converting to document based soap message before sending message to vendor.
For that I am using SOAPInput->SoapExtract->Compute->SoapRequest. In this setup SOAPInput has rpc based wsdl while SOAPRequest has document based wsdl.Now I am able to read the message but when creating document based soap message I don't have success.
When I tried to create body by using OutputRoot.SOAP.Body.bat:ServiceRequest, the broker toolkit says it couldn't able to recognize this. But on the other side broker toolkit is able to refer to the body elements of wsdl which is belongs to SOAPInput node. What I have to do so that broker toolkit can recognize wsdl belongs to SoapRequest.
Any help is highly appreciated. |
|
Back to top |
|
 |
broker sycho |
Posted: Mon Oct 05, 2009 6:41 pm Post subject: my ESQL |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
My ESQL looks as follows. In that I am able to read input soap message, but when I tried to create output reference it says unresolvable message reference. So the problem is compute node recognizes wsdl associated with soapinput node but not with soaprequest node. What I have to do so that my flow also recognizes wsdl associated with soaprequest node.
Code: |
CREATE COMPUTE MODULE CardActivationWSFlow_Request_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
--CALL CopyEntireMessage();
DECLARE ns0 NAMESPACE 'http://ejb.testlink.biz';
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE bat NAMESPACE 'http://Test.abc.com';
DECLARE InputRef REFERENCE TO InputRoot.XMLNSC.ns0:submitTest.in3;
DECLARE OutputRef REFERENCE TO OutputRoot.SOAP.Body.bat:Test.ServiceTestRequest;
SET OutputRoot.SOAP.Context.operation ='submitTest';
SET OutputRoot.SOAP.Context.portType='Test';
SET OutputRoot.SOAP.Context.operationType='REQUEST_RESPONSE';
SET OutputRoot.SOAP.Context.service='TestService';
SET OutputRoot.SOAP.Context.fileName='Test.wsdl';
SET OutputRoot.SOAP.Context.SOAP_Version='1.1';
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soapenv= 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:bat=
'http://Test.abc.com';
DECLARE FieldRefPtr REFERENCE TO InputRoot.*[3];
MOVE FieldRefPtr FIRSTCHILD;
IF FIELDNAME(FieldRefPtr)='submitTest' THEN
SET OutputRef.serviceUsername= InputRoot.XMLNSC.ns0:submitTest.in0;
SET OutputRef.serviceUserPassword= InputRoot.XMLNSC.ns0:submitTest.in1 |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 05, 2009 8:37 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
For what it's worth
- you did not copy the message headers
- you use a reference to a location that does not exist and do not check the return code Lastmove(ref)
Code: |
DECLARE OutputRef REFERENCE TO OutputRoot.SOAP.Body.bat:Test.ServiceTestRequest; |
Don't know the meaning of SOAP.Body.... did you by any chance mean
Code: |
create Last Child of OutputRoot Domain 'XMLNS' Name 'XMLNS';
Declare OutputRef REFERENCE TO OutputRoot.XMLNS;
create last child of OutputRef AS OutputRef Namespace soapenv name 'Envelope';
create last child of OutputRef AS OutputRef namespace soapenv name 'Body';
create Last child of OutputRef namespace bat name 'Test';
create last child of OutputRef.bat:Test name 'ServiceTestRequest'; |
Hopefully this makes more sense to you  _________________ MQ & Broker admin |
|
Back to top |
|
 |
broker sycho |
Posted: Mon Oct 05, 2009 9:25 pm Post subject: soap body |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
1. There is nothing interesting message headers.
2. The code reference exist as part of soaprequest wsdl but not as a part of soapinput. Soapinput refer to different wsdl and as I mentioned my previous post broker somehow ignores soaprequest wsdl.
3. For your question to soap body I am trying to follow following tutorial.
http://www.ibm.com/developerworks/library/ws-soapnode2/index.html
According to that I can directly refer to OutputRoot.SOAP.Body.bat, but it doesn't work.
As per your suggestion are you advising to use XMLNS instead of SOAP or XMLNSC? |
|
Back to top |
|
 |
broker sycho |
Posted: Mon Oct 05, 2009 11:02 pm Post subject: target document based soap request |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
FYI, I am trying to create following document literal based request from incoming rpc based request. And as mentioned I am able to read the rpc request.
Code: |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:bat="http://Test.abc.com">
<soapenv:Header/>
<soapenv:Body>
<bat:ServiceTestRequest>
<serviceUsername>username</serviceUsername>
<serviceUserPassword>pswd</serviceUserPassword>
<serviceClientId>45</serviceClientId>
<firstCardNumber>7777017483419546</firstCardNumber>
<lastCardNumber>7777017483506070</lastCardNumber>
<merchantNumber>88888885</merchantNumber>
<altMerchantNumber>8354</altMerchantNumber>
<clerkId></clerkId>
<removeValue>false</removeValue>
<user1></user1>
<user2></user2>
</bat:ServiceTestRequest>
</soapenv:Body>
</soapenv:Envelope> |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 06, 2009 4:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You did not specify that you were using V6.1 and SOAP nodes...
I'll defer to somebody more familiar with the SOAP nodes...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 06, 2009 5:33 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I hope the WSDLs are in two different namespaces. |
|
Back to top |
|
 |
broker sycho |
Posted: Tue Oct 06, 2009 9:45 am Post subject: wsdls are in different namespace |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
how to check wsdls are in different name space or not? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 06, 2009 9:47 am Post subject: Re: wsdls are in different namespace |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
broker sycho wrote: |
how to check wsdls are in different name space or not? |
Look and see?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
broker sycho |
Posted: Tue Oct 06, 2009 10:06 am Post subject: name space |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
ok here is what I found when I tried to look at XML1 of document based wsdl it says
namespace URI:Test.abc.com and prefix tns
while for the RpC based wsdl I found different namespaces with different prefixes.
The only common thing I found is reference to soapenv in both wsdl namespaces in xml1 declaration. |
|
Back to top |
|
 |
mgk |
Posted: Tue Oct 06, 2009 10:20 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
I tried to create output reference it says unresolvable message reference |
Where does it say that? Can you post the full error?
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
broker sycho |
Posted: Tue Oct 06, 2009 12:46 pm Post subject: creating soap message |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
The problem is creating soap message. Since I am not able to create soap message it gives me an error BIP311E.
Any idea how to create a soap message for the sample message I have posted. |
|
Back to top |
|
 |
mgk |
Posted: Tue Oct 06, 2009 2:09 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
BIP311 is not a valid error message number. Can you post the WHOLE of the error mesage please? _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
broker sycho |
Posted: Tue Oct 06, 2009 4:53 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
I have changed my design now and using mapping node. I can post error details by tomorrow. |
|
Back to top |
|
 |
broker sycho |
Posted: Wed Oct 07, 2009 1:07 pm Post subject: errro message |
|
|
Novice
Joined: 05 Oct 2009 Posts: 10
|
Ok now I am using mapping as per sample given below:
http://www.ibm.com/developerworks/webservices/library/ws-soapnode2/
But I am using submap to map and while creating message I am getting following error:
BIP5025E: XML schema validation error ''cvc-datatype-valid.1.2: The value "p594:>ServiceBatchException" is not a valid value for the "QName" datatype.'' on line '1' column '462' when parsing element ''/XMLNSC/http://schemas.xmlsoap.org/soap/envelope/:Envelope/http://schemas.xmlsoap.org/soap/envelope/:Body/http://schemas.xml |
|
Back to top |
|
 |
|