ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Process Server (WID/WPS/WAS+) » [RESOLVED]Invoking a remote webservice via WPS - SOAPFault

Post new topic  Reply to topic
 [RESOLVED]Invoking a remote webservice via WPS - SOAPFault « View previous topic :: View next topic » 
Author Message
raghavendrarao5
PostPosted: Thu Jan 10, 2008 7:01 am    Post subject: [RESOLVED]Invoking a remote webservice via WPS - SOAPFault Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 14

input business objects for a web service call using Websphere Integration Developer.

The following is the RemoteException that is issued:

WebServicesFault
faultCode: (http:// TestExSimpleException)
faultString: this should be a SimpleException
faultActor: null
faultDetail:

Any pointers or inputs on this issue..? the wsdl file has been imported and included as an interface into the assembly diagram. It appears that it calls the web service - but always it returns this exception.[/b]


Last edited by raghavendrarao5 on Fri Mar 28, 2008 5:30 am; edited 1 time in total
Back to top
View user's profile Send private message
raghavendrarao5
PostPosted: Thu Jan 10, 2008 7:05 am    Post subject: Tried using setDataObject - sending NULL in the SOAP request Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 14

Yesterday we also tried setting the dataObject values in a Java snippet node and sending it as input to the webservice.

Simple types were getting parsed correctly - but the complex types - I mean data structures were getting passed to the function call as NULL.

Following is the code we used in the Java snippet node. Is there any possible alternative:

System.out.println("Credit check approved. Sending Transfer transaction to Finacle...");

System.out.println("Transaction reference: " + TransferTranInput.getString("dccReqRefNum"));



BOFactory bofactory = (BOFactory) ServiceManager.INSTANCE.locateService("com/ibm/websphere/bo/BOFactory");

ciUserInfo = bofactory.create("http://common.ci.infosys.com", "CIUserInfo");

ciUserInfo.setString("interfaceNode", TransferTranInput.getString("interfaceNode"));

ciUserInfo.setString("bankId", TransferTranInput.getString("bankID"));

ciUserInfo.setString("applicationId", TransferTranInput.getString("applicationID"));

ciUserInfo.setString("accessChannelId", TransferTranInput.getString("accessChannelID"));

ciUserInfo.setString("channelType", TransferTranInput.getString("channelType"));

ciUserInfo.setString("timezone", TransferTranInput.getString("timezone"));

ciUserInfo.setString("dccReqVersion", "VER1");



fiDataElement = bofactory.create("http://common.ci.infosys.com", "FIDataElement");

fiDataElement.setString("key", fiDetails.getString("key"));

fiDataElement.setString("value", fiDetails.getString("value"));

List fiArray = new ArrayList();

fiArray.add(0, fiDataElement);



tableTns2FIDataElement = bofactory.create("http://ws.fi.infosys.com", "ArrayOf_tns2_nillable_FIDataElement");

tableTns2FIDataElement.setList("FIDataElement", fiArray);



customInfo = bofactory.create("http://common.ci.infosys.com", "FIObjectHash");

customInfo.setInt("count", TransferTranInput.getInt("count"));

customInfo.setInt("factor", TransferTranInput.getInt("factor"));

customInfo.setDataObject("table", tableTns2FIDataElement);

ciUserInfo.setDataObject("customInfo", customInfo);



transferStruct = bofactory.create("http://cistruct.ons.ci.infosys.com", "TMTransferTranStruct");

transferStruct.setDataObject("customData", customInfo);



fiIncidentInfo = bofactory.create("http://common.ci.infosys.com","FIIncidentInfo");

fiIncidentInfo.setString("dccReqRefNum", TransferTranInput.getString("dccReqRefNum"));

fiIncidentInfo.setString("dccReqType", TransferTranInput.getString("dccReqType"));

fiIncidentInfo.setString("dccReqOrigTime", TransferTranInput.getString("dccReqOrigTime"));

fiIncidentInfo.setString("backEndReqRefNum", TransferTranInput.getString("backEndReqRefNum"));

fiIncidentInfo.setString("tranId", "1");



transferStruct.setDataObject("fiIncidentInfo", fiIncidentInfo);

transferStruct.setString("ovrdExcpnFlg", "Y");



creditranAcctId = bofactory.create("http://cistruct.ons.ci.infosys.com", "AcctId");

creditranAcctId.setString("acctName", "FICreditAccount");

creditranAcctId.setString("crncyCode", "USD");

creditranAcctId.setString("foracid", TransferTranInput.getString("Account"));

creditranAcctId.setString("solId", "102");



debitranAcctId = bofactory.create("http://cistruct.ons.ci.infosys.com", "AcctId");

debitranAcctId.setString("acctName", "FIDebitAccount");

debitranAcctId.setString("crncyCode", "USD");

debitranAcctId.setString("foracid", "SBA-02");

debitranAcctId.setString("solId", "102");



creditTranAmount = bofactory.create("http://common.ci.infosys.com", "Amount");

creditTranAmount.setDouble("amountValue", TransferTranInput.getDouble("creditAmount"));

creditTranAmount.setString("currencyCode", TransferTranInput.getString("creditCurrency"));



debitTranAmount = bofactory.create("http://common.ci.infosys.com", "Amount");

debitTranAmount.setDouble("amountValue", TransferTranInput.getDouble("debitAmount"));

debitTranAmount.setString("currencyCode", TransferTranInput.getString("debitCurrency"));



creditTranType = bofactory.create("http://cistruct.ons.ci.infosys.com", "PartTransactionType");

creditTranType.setString("creditDebitFlag", "C");

debitTranType = bofactory.create("http://cistruct.ons.ci.infosys.com", "PartTransactionType");

debitTranType.setString("creditDebitFlag", "D");



creditTranDetails = bofactory.create("http://cistruct.ons.ci.infosys.com", "PartTransactionDetailTm");

creditTranDetails.setDataObject("acctId", creditranAcctId);

creditTranDetails.setDataObject("partTransactionType",creditTranType);

creditTranDetails.setDataObject("tranAmt", creditTranAmount);



Date valueDate = new Date();

valueDate.setTime(System.currentTimeMillis());



creditTranDetails.setDate("valueDate", valueDate);

debitTranDetails = bofactory.create("http://cistruct.ons.ci.infosys.com", "PartTransactionDetailTm");

debitTranDetails.setDataObject("acctId", debitranAcctId);

debitTranDetails.setDataObject("partTransactionType",debitTranType);

debitTranDetails.setDataObject("tranAmt", debitTranAmount);

debitTranDetails.setDate("valueDate", valueDate);



List tranDetails = new ArrayList();

tranDetails.add(0, creditTranDetails);

tranDetails.add(1, debitTranDetails);



partTranDetails = bofactory.create("http://ws.fi.infosys.com", "ArrayOf_tns3_nillable_PartTransactionDetailTm");

partTranDetails.setList("PartTransactionDetailTm", tranDetails);



transferTranDetail = bofactory.create("http://cistruct.ons.ci.infosys.com", "TmTransferTranDetail");

transferTranDetail.setDataObject("partTransactionDetailTmLL", partTranDetails);



transferStruct.setDataObject("tmtransferTranDetail", transferTranDetail);

tranSubType = bofactory.create("http://cistruct.ons.ci.infosys.com", "TranSubTypeTm");

tranSubType.setString("tranSubType", "CI");

tranSubType.setString("tranType", "T");



tranIdentifier = bofactory.create("http://cistruct.ons.ci.infosys.com", "TranIdentifier");

tranIdentifier.setDate("tranDate", valueDate);

tranIdentifier.setString("tranId", "COR");



tranHeader = bofactory.create("http://cistruct.ons.ci.infosys.com", "TMtransferTranHeader");

tranHeader.setDataObject("tranIdentifier",tranIdentifier);

tranHeader.setDataObject("tranSubTypeTm", tranSubType);



transferStruct.setDataObject("tmtransferTranHeader", tranHeader);
Back to top
View user's profile Send private message
raghavendrarao5
PostPosted: Thu Jan 24, 2008 12:42 am    Post subject: Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 14

Today, I tried printing the output onto the console, to see how the complex type was populated.



Following statements resulted in a valid output:

Code snippet:

ciUserInfo is defined as a variable in the business process design time.



ciUserInfo = bofactory.create("http://common.ci.infosys.com", "CIUserInfo");

ciUserInfo.setString("interfaceNode", "COR");

ciUserInfo.setString("bankId", "01");

ciUserInfo.setString("applicationId", "1");

ciUserInfo.setString("accessChannelId", "COR");

ciUserInfo.setString("channelType", "CRM");

byte byte1[] = {1};

ciUserInfo.setString("timezone", "GMT+01:30");

ciUserInfo.setBytes("correlationId", byte1);

System.out.println("CIUserInfo Interface Node: " + ciUserInfo.getString("interfaceNode"));

System.out.println("CIUserInfo BankId: " + ciUserInfo.getString("bankId"));

System.out.println("Here boss...");

System.out.println("CIUserInfo Access channel: " + ciUserInfo.getString("accessChannelId"));

System.out.println("CIUserInfo Time zone: " + ciUserInfo.getString("timezone"));

System.out.println("CIUserInfo CorrelationId: " + ciUserInfo.getBytes("correlationId"));

System.out.println("CIUserInfo ChannelType: " + ciUserInfo.getString("channelType"));



Output:

[1/23/08 17:21:09:387 IST] 00000053 SystemOut O Begin the Credit check for Account: SBA-01

[1/23/08 17:21:09:387 IST] 00000053 SystemOut O Please wait while the credit check completes

[1/23/08 17:21:09:559 IST] 00000052 SystemOut O ----------Begin with Credit Check---Amounts over 1000.00 are automatically Rejected---------

[1/23/08 17:21:09:559 IST] 00000052 SystemOut O ----------Credit Check Cleared---------Valid account-------

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo Interface Node: COR

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo BankId: 01

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O Here boss...

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo Access channel: COR

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo Time zone: GMT+01:30

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo CorrelationId: [B@40d85543

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo ChannelType: CRM



The same CIUserInfo complex type, when printed directly resulted in the following output:

Code snippet:

ciUserInfo is defined as a variable on the business process



ciUserInfo = bofactory.create("http://common.ci.infosys.com", "CIUserInfo");

ciUserInfo.setString("interfaceNode", "COR");

ciUserInfo.setString("bankId", "01");

ciUserInfo.setString("applicationId", "1");

ciUserInfo.setString("accessChannelId", "COR");

ciUserInfo.setString("channelType", "CRM");

byte byte1[] = {1};

ciUserInfo.setString("timezone", "GMT+01:30");

ciUserInfo.setBytes("correlationId", byte1);



System.out.println("CIUserInfo: " + ciUserInfo);



Output:

[1/23/08 17:21:09:387 IST] 00000053 SystemOut O Begin the Credit check for Account: SBA-01

[1/23/08 17:21:09:387 IST] 00000053 SystemOut O Please wait while the credit check completes

[1/23/08 17:21:09:559 IST] 00000052 SystemOut O ----------Begin with Credit Check---Amounts over 1000.00 are automatically Rejected---------

[1/23/08 17:21:09:559 IST] 00000052 SystemOut O ----------Credit Check Cleared---------Valid account-------

[1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo: com.ibm.ws.bo.impl.BusObjImpl@4d615543 (eClass: com.ibm.ws.bo.impl.BusObjSpecImpl@1153155b (eClass: com.ibm.wsspi.core.extension.model.ClassifierPackage$StaticMeta@7e615548 (name: boDefinition) (instanceClassName: com.ibm.ws.bo.impl.BusObjSpecImpl) (abstract: false, interface: false)) (name: CIUserInfo) (instanceClassName: null) (abstract: false, interface: false)file:/D:/Test_Workspace/FI_BPM_Demo/BankBranchInquiryBase.wsdl)



Apparently, the input to the webservice call also showed a similar display on the monitor when the input message structure was traced.

Any pointers on how do we handle such a case…?
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Jan 25, 2008 9:54 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Isn't there a unit test capability to test a web service? I'd suggest using it to see what it thinks your business object looks like. I'm guessing that there is some kind of mismatch between things causing your error. The unit test tool might point this out.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
raghavendrarao5
PostPosted: Wed Feb 20, 2008 10:43 pm    Post subject: Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 14

Unit test resulted in the same error:

Code:
1/23/08 17:21:09:684 IST] 00000053 SystemOut O CIUserInfo: com.ibm.ws.bo.impl.BusObjImpl@4d615543 (eClass: com.ibm.ws.bo.impl.BusObjSpecImpl@1153155b (eClass: com.ibm.wsspi.core.extension.model.ClassifierPackage$StaticMeta@7e615548 (name: boDefinition) (instanceClassName: com.ibm.ws.bo.impl.BusObjSpecImpl) (abstract: false, interface: false)) (name: CIUserInfo) (instanceClassName: null) (abstract: false, interface: false)file:/D:/Test_Workspace/FI_BPM_Demo/BankBranchInquiryBase.wsdl)


The structure populated within any complex data type is displayed as:
Quote:
com.ibm.ws.bo.impl.BusObjImpl@.....
.

Printing out the variable within complex type such as:
Code:
System.out.println("CIUserInfo Interface Node: " + ciUserInfo.getString("interfaceNode"));

shows the correct value.

Any pointers as to why the complex type does not get displayed correctly when we have the variables within complex type being displayed...
Back to top
View user's profile Send private message
raghavendrarao5
PostPosted: Fri Mar 28, 2008 5:28 am    Post subject: Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 14

This worked after using the "Assign" feature in Process logic instead of adding the code in "Snippet"...assign is a good mapping feature in WPS...

Thanks for the inputs...
Raghavendra.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Process Server (WID/WPS/WAS+) » [RESOLVED]Invoking a remote webservice via WPS - SOAPFault
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.