cancel
Showing results for 
Search instead for 
Did you mean: 

remote access of mockservice

Highlighted
Occasional Contributor

remote access of mockservice

Hi,

I have mockservice running on my local machine, and I would like to access this mockservice from a different machine.

local end point
http://127.0.0.1:8088/mockTestSOAP

IP address of local machine, e.g.

11.22.00.33

used following end point to access above service from a remote machine

http://11.22.00.33:8088/mockTestSOAP


Is this possible  ? (I tried , but it didn't work)

How do I access it  ?

Please advise

thank you

Jignesh
4 REPLIES 4
Highlighted
Super Contributor

Re: remote access of mockservice

Hi!

it should definitely be possible! In what way does it not work? Are you getting errors in/from soapUI? Could there be a firewall not permitting access?

regards,

/Ole
eviware.com
Highlighted
Occasional Contributor

Re: remote access of mockservice

yes, looks like its firewall problem with my machine.

I finally got to work the mock service/reponse.  But the J2EE client calling  this mock service is getting exception

....: An unexpected exception occured: java.lang.IllegalArgumentException: com.ibm.ws.webservices.engine.xmlsoap.Text incompatible with javax.xml.soap.SOAPElement from url ....

After further debugging, found that client is looking for soap body in "firstChild" element, but its actually in "nextSibling". Here is the client code

SOAPMessage reply = connection.call(message, getURL());

responseSOAP = (SOAPElement)reply.getSOAPPart().getEnvelope().getBody().getFirstChild();


We cannot change our client code to look for it in nextSibling.
How can I send mock reponse in firstChild instead of in nextSibling ?

Please advise

thank you

Jignesh
Highlighted
Super Contributor

Re: remote access of mockservice

Hi!

Please try setting the "Strip Whitespaces" property of the mockresponse to true (in the bottom left properties table when the mockresponse is selected), which should make the body the first child (instead of a text-node)

regards,

/Ole
eviware.com
Highlighted
Occasional Contributor

Re: remote access of mockservice

Stripping whitespace solved my problem. Thanks for the PROMPT responses.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors