Author Message
mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
Hi

I am having a hard time mapping out response parameters for the WDSLshown below.

Use java Obj in the Output parameters for this WSDL are disabled some reason. I've read some of the forums on devconnect and one of them suggest that we need to write a servlet to extract values. I got one of the java developer to look at the WDSL that is working v/s the one that is having issues and he tells me that only difference is that the XSD is in a separate file (attached) for this WSDL. please advise.

---------------
WSDL contents:

<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-.
-->
- <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-.
-->
- <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.ivr.custmgmt.acn.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://service.ivr.custmgmt.acn.com/" name="IVRPaymentService">
- <types>
- <xsd:schema>
<xsd:import namespace="http://service.ivr.custmgmt.acn.com/" schemaLocation="http://vaulttest:9180/ivr-cybersource/IVRPaymentService?xsd=1" />
</xsd:schema>
</types>
- <message name="generatePaymentProfile">
<part name="custId" type="xsd:string" />
<part name="cardNumber" type="xsd:string" />
<part name="cardExpiration" type="xsd:string" />
</message>
- <message name="generatePaymentProfileResponse">
<part name="return" type="tns:referenceInfoVO" />
</message>
- <portType name="IVRPaymentService">
- <operation name="generatePaymentProfile" parameterOrder="custId cardNumber cardExpiration">
<input message="tns:generatePaymentProfile" />
<output message="tns:generatePaymentProfileResponse" />
</operation>
</portType>
- <binding name="IVRPaymentServiceBinding" type="tns:IVRPaymentService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
- <operation name="generatePaymentProfile">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" namespace="http://service.ivr.custmgmt.acn.com/" />
</input>
- <output>
<soap:body use="literal" namespace="http://service.ivr.custmgmt.acn.com/" />
</output>
</operation>
</binding>
- <service name="IVRPaymentService">
- <port name="IVRPaymentService" binding="tns:IVRPaymentServiceBinding">
<soap:address location="http://vaulttest:9180/ivr-cybersource/IVRPaymentService" />
</port>
</service>
</definitions>


SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
When you say that you're having trouble mapping parameters, what does that mean? It doesn't sound like the WSDL is having trouble loading, and it sounds like you are able to get through the wizard. Are you expecting the Output parameters to be different than what you see?

Looking at the WSDL, this web service appears to be returning an object, so the Use Java Object box will have to be enabled. DD will do some level of parsing if it can, but it looks like in this case you would have to write Java in a servlet to get at the values. I haven't seen your schema, but it sounds like DD is correctly parsing the WSDL and giving you the parameters as per the definitions.
mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
Hi Samaresh,

Uisng the WSOP editor in OD, I am not seeing Output parameters the way they are defined in the WSDL. There are 4 different parameters defined in the XSD file and I am seeing jsut one!

The "Use Java Object" is disabled and we are not able to toggle it, so we figured that we'll probably need to write a servlet. I got Java programmer to help me with the servlet but we had no success with it.

Do you have an example of a servlet that I can share with my Java developer to move forward.

Mm
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
Sure, here is some servlet code I used recently:

   public void servletImplementation(com.avaya.sce.runtimecommon.SCESession mySession) {
      InitSessionRqE rqe = new InitSessionRqE();
      InitSessionRq rq = new InitSessionRq();
      
      rq.setAllVendors(1);
      rq.setAvoidSession(1);
      rq.setBusinessDate(Calendar.getInstance());
      rq.setClerk("Clerk");
      rq.setComment("Commentary");
      
      CurrencyCodes_type0 code = new CurrencyCodes_type0();
      CurrencyCodesSequence s1 = new CurrencyCodesSequence();
      CurrencyCodesSequence s2 = new CurrencyCodesSequence();
      CurrencyCodesSequence[] seq = {s1, s2};
      for(CurrencyCodesSequence s : seq) {
         Row_type0 row = new Row_type0();
         row.setValue(0);
         s.setRow(row);
      }
      code.setCurrencyCodesSequence(seq);
      rq.setCurrencyCodes(code);
      rq.setEcho("Echo");
      rq.setEncoding("UTF-8");
      rq.setLanguage(1);
      rq.setNeedDicts(1);
      rq.setPassword("password");
      rq.setProduct("Product Name");
      rq.setRetAddress("Address");
      rq.setSavepoint("save");
      rq.setSession(1);
      rq.setVer(new BigDecimal(1.0));
      
      rqe.setRequest(rq);
      
      mySession.getVariableField(IProjectVariables.INIT_SESSION_RQ).setValue(rqe);
}

The WSDL for this web service was quite complex with multiple XSD files. When the WSOP wizard was brought up, OD wasn't able to automatically parse the WSDL enough to give you all of the values you see being set above. Rather, it gave much what you are seeing, just a single request/response variable and "Use Java Object" checked automatically. This might go without saying, but make sure that you set the OD variable with the request object (i.e. the last line in the above code). I used "IProjectVariables.INIT_SESSION_RQ", but you can just write in the variable name yourself as a string.
mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
Thank you Samaresh!

My Java associate was able to write the servlet and get hardcoded values out from the response.

Now, the last missing piece of the puzzle for us - How do we get values that come back in the response mapped out instead of using hard coded values.

Mm
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
Are you exporting the module from a different version of OD than the one parent app is using? Can you check what version of runtime WEB-INF\lib\scer-xyz.jar the module project uses?
mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
We coded that app in OD and are simulating results in OD, not at the point to export the app yet. Avaya OD version is 6.0.0.0901.

The only jar file I see that matches your description is scert-06.00.09.01. I do not see a scer-xyz.jar anywhere!
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
Sorry, that post wasn't meant for this question. Something must have gotten crossed, somehow.

The questions that I actually posted, or at least tried to apparently, are:

I'm not sure if I understand that issue. When you say "hardcoded values" what does that mean exactly? Are you referring to values that are set by the server in the response, and that you want to set them yourself? Also, what did you mean by "mapped out"? Mapped out to what? What is the response looking like now?
mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
Hi Samaresh,

We are able to test in SoapUI and we see a response.

At present, we are using SET method to populate values. The goal is to find the output parameters in Orchestration Designer.
Please help - an example would help drive this home!

mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
Hi Samaresh,

In the sample code you have provided, all values seem to be hardcoded ("password", "Product Name", "Address" below):

rq.setPassword("password");
rq.setProduct("Product Name");
rq.setRetAddress("Address");

We have been able to do the same type of thing (hard coding values), but we want to get those values from the webservice response.

We want to do something like this (using his example):

rq.setPassword(response.getPassword());
rq.setProduct(response.getProductName());
rq.setRetAddress(response.getAddress());

However, we don't know how to get to the webservice response object to set those values to be passed back to your app. That to me, is the big outstanding question.
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
How is this possible?

rq.setPassword(response.getPassword());
rq.setProduct(response.getProductName());
rq.setRetAddress(response.getAddress());

Your code says to take response values and set it in the request object. That is backwards to how it works. The request has to be built and sent first before the response will come back. So you can't create a request using the response because the response doesn't yet exist. This is the order:

OD app starts -> Java servlet builds request object -> OD makes webservice call -> webservice sends response object -> OD stores response object in OD var -> Java servlet extracts response object values from OD var-> OD flow continues -> OD app ends

The sample code I gave builds a request using hardcoded values. Only after you call the webservice will you get back a response. That response is stored in the variable as specified in the WSOP. The code I gave does not handle the response at all. You need to create a separate bit of Java code to get response values. There should be an object called something along the lines of InitSessionRpE and InitSessionRp, within which the response will be stored.
mannymatharoo
Joined: Oct 17, 2012
Messages: 0
Offline
I may have not asked the right question, but we figured out the solution.

We needed to have project variables defined for what is expected in the response and use it in the java servlet to gain access to what is being returned from the WSDL


String STATUS = aR.getStatus();
mySession.getVariableField(IProjectVariables.IVR_REPINFO,IProjectVariables.IVR_REPINFO_FIELD_STATUS).setValue(STATUS);
Go to:   
Mobile view