Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue in webservices Response binding

 
Saranath Rangamannar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently facing issue with the data binding on complex type elements in webservices response.

Below is the list of steps done for generating the SOAP client using JAX-WS.
1. WSDL used is attached here

2. Steps followed for generating the client
a. Copy the WSDL to IntegrationGateway project
b. Right click and generated Webservice Client
3. On testing the Webservices, using SOAP UI, we could get the response,
Request and response are attached here

URL:
http://abcd1234.com:41007/InstantCreditService
Request: Not Mandatory
Note: For now the middleware team hardcode the response and send
4. While testing the same service using the Java client using the Stub tested, the response data is not getting blinded to the stub objects
Below is the generated Stub,

Below is the Test program used,



Below is the test log, which shows the resquest and response string,

TaskCmd performExecute()
In executeWebService
Inside createInstantCreditRequestDataObject
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: Trying to locate com/sun/xml/internal/ws/developer/jaxb.properties
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: not found
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: Trying to locate javax/xml/ws/wsaddressing/jaxb.properties
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: not found
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: Checking system property javax.xml.bind.JAXBContext
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: not found
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: Checking META-INF/services
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: Unable to find: META-INF/services/javax.xml.bind.JAXBContext
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder find
FINE: Trying to create the platform default provider
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder safeLoadClass
FINE: Trying to load com.sun.xml.internal.bind.v2.ContextFactory
Jul 24, 2014 11:56:13 AM javax.xml.bind.ContextFinder newInstance
FINE: loaded com.sun.xml.internal.bind.v2.ContextFactory from jar:file:/C:/IBM/SDP/runtimes/base_v7/java/jre/lib/rt.jar!/com/sun/xml/internal/bind/v2/ContextFactory.class
log4j:WARN No appenders could be found for logger (com.ibm.ws.webservices.custom.CustomPropertyProviderImpl).
log4j:WARN Please initialize the log4j system properly.
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder find
FINE: Checking system property javax.xml.bind.JAXBContext
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder find
FINE: not found
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder find
FINE: Checking META-INF/services
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder find
FINE: Unable to find: META-INF/services/javax.xml.bind.JAXBContext
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder find
FINE: Trying to create the platform default provider
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder safeLoadClass
FINE: Trying to load com.sun.xml.internal.bind.v2.ContextFactory
Jul 24, 2014 11:56:15 AM javax.xml.bind.ContextFinder newInstance
FINE: loaded com.sun.xml.internal.bind.v2.ContextFactory from jar:file:/C:/IBM/SDP/runtimes/base_v7/java/jre/lib/rt.jar!/com/sun/xml/internal/bind/v2/ContextFactory.class
---[HTTP request - http://abcd1234.com:41007/InstantCreditService]---
Soapaction: "http://www.ibminscred.org/InstantCreditService/CreditOperation"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-type: text/xml;charset="utf-8"
<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:InstantCreditOperation xmlns:ns2="http://www.ibminscred.org/InstantCreditService/"><InstantCreditRequest><version>4.3.0</version><clientName>ABCD</clientName><firstName>saranath</firstName><lastName>rangamannar</lastName><address1>25 Research Drive</address1><city>Westborough</city><state>MA</state><zipcode>01581</zipcode><country>USA</country><homeNumber>7745126564</homeNumber><incomeAmount>123456</incomeAmount><incomeInd>A</incomeInd><cardType>MC</cardType><posType>123456</posType><recordType>123456</recordType><birthdayDate>12-Dec-2012</birthdayDate><ssn>SSN123456</ssn><applicationSubType>ELT</applicationSubType><customerFacingInd>Y</customerFacingInd><customerMemberId>1234567890</customerMemberId><logo>900</logo><RequestCreationDate>22-Jul-2014</RequestCreationDate></InstantCreditRequest></ns2:InstantCreditOperation></S:Body></S:Envelope>--------------------
---[HTTP response - http://abcd1234.com:41007/InstantCreditService - 200]---
null: HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Date: Thu, 24 Jul 2014 15:55:28 GMT
Content-type: text/xml;charset=ibm-437
Content-length: 1399
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins="http://www.ibminscred.org/InstantCreditService/">
<soapenv:Header/>
<soapenv:Body>
<ins:InstantCreditOperationResponse>
<ResponseData>
<!--Optional:-->
<correlationData>1234</correlationData>
<returnCode>101</returnCode>
<!--Optional:-->
<errorCode>100</errorCode>
<!--Optional:-->
<errorMessage>hhjh</errorMessage>
<cardType>IC</cardType>
<ResponseSummary>?</ResponseSummary>
</ResponseData>
<instantCredit>
<accountNumber>455454</accountNumber>
<accountId>1211</accountId>
<creditLimit>4000</creditLimit>
<applicationId>AAAA</applicationId>
<apr>1.9</apr>
<firstName>john</firstName>
<middleInitial>smith</middleInitial>
<lastName>a</lastName>
<address1>1898989</address1>
<!--Optional:-->
<address2>tom street</address2>
<city>boston</city>
<state>ma</state>
<zipCode>01587</zipCode>
<ResponseCreationTimestamp></ResponseCreationTimestamp>
</instantCredit>
</ins:InstantCreditOperationResponse>
</soapenv:Body>
</soapenv:Envelope>--------------------
performExecute executeWebService
Note: The Request and Response XMLs are highlighted in different colors for easy understanding.

The response on the service is not blinded into the response object, attached the screenshot showing the value of the object while doing the code debug,

Request Values: Ref attachment

Response Values: Ref attachment


Please help me in resolving this issue. Not sure, I am doing anything wrong.
WS client error Request.jpg
[Thumbnail for WS client error Request.jpg]
Webservices Client Request
WS client error Response.jpg
[Thumbnail for WS client error Response.jpg]
Webservices Client Response - Null on Debug
 
Mike Degteariov
Ranch Hand
Posts: 145
8
Java Mac MySQL Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saranath,

1. WSDL used is attached here

Where ? I cannot see it.

http://abcd1234.com:41007/InstantCreditService

The endpoint is dead.

Below is the generated Stub,

Below is the Test program used,

Below is the test log, which shows the resquest and response string,

Sometimes it is hard to understand what you are talking about.


Note: The Request and Response XMLs are highlighted in different colors for easy understanding.

I think that this forum does not allow different colors. What do you mean ? Where is it highlighted, exactly ?

The response on the service is not blinded into the response object, attached the screenshot showing the value of the object while doing the code debug,

I cannot see any attached screenshots. Am I missing something ?

Kindly clarify.
 
Saranath Rangamannar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mike...

Unfortunately the document I have prepared was not getting attached, now I have updated the above information and provided some screenshots.

Please let me know, if you need any more information to troubleshoot the error.
 
Mike Degteariov
Ranch Hand
Posts: 145
8
Java Mac MySQL Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the following excerpt from your code,



in the line 7 and 8 you declare a variable of type Holder<GetResponseData> and Holder<GetInstantCredit> and set their initial values to null.

On the line 10, you pass these null values as parameters to instantCreditProxy.instantCreditOperation(...)

It is important to understand that after instantCreditOperation completes, responseData and instantCredit will continue to have null values.
I say it again, call to instantCreditOperation does not change responseData and instantCredit from null to not null.

I guess your possible first step here is set initial values for responseData, like this:



Let me know if you continue having problems after the change.
 
grapes are vegan food pellets. Eat this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!