Railo and SOAP Webservice

431 views
Skip to first unread message

Michael Forell

unread,
Oct 26, 2012, 4:37:20 AM10/26/12
to ra...@googlegroups.com
Hi Group, 

I'm doing some developing and need to consume a third-party webservice. As I'm not a real SOAP-Webservice expert as of now, I'm interessted in informations on how to debug this in Railo.
What I'm doing is 
<cfscript>
ws=CreateObject("webservice", "http://www.webservicex.net/globalweather.asmx?wsdl");
ws.GetWeather("Berlin","Germany");
req=getSOAPResponse(ws);
</cfscript>
<cfdump eval="ws">
<cfdump eval="req">
And this works! 

However, in production I need to consume another webservice, and this fails in Railo (and OpenBD and Adobe CF10). 
Railo throws an error like this when trying to invoke the webservice (creating the webservice object works fine):
Railo 4.0.1.004 Error (org.apache.axis.AxisFault)
Message ; nested exception is:
java.lang.NullPointerException
; nested exception is:
   java.lang.NullPointerException
   at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:325):325
   at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035):1035
   at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165):165
   at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141):1141
   at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236):236
   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384):384
   at org.apache.axis.client.Call.invoke(Call.java:2467):2467
   at org.apache.axis.client.Call.invoke(Call.java:2366):2366
   at org.apache.axis.client.Call.invoke(Call.java:1812):1812 


As I have working PHP examples, I must agree that the webservice itself seems to work somehow. 
I also tested the webservice with soapUI, and can also have a look at it with SOAPMonitor. 

In SOAPMonitor I can see, that Railo does a request and also gets the expected response. However Railo seems to fail in parsing whatever comes back from that Webservice. 
So, is there any chance of debugging this deeply on Railo-side?


Thanks & Best Regards
Michael 

Alex Skinner

unread,
Oct 26, 2012, 4:42:55 AM10/26/12
to ra...@googlegroups.com
I had the same problem calling the Atlassian Jira soap service, to be honest I figured it was something in my code in my case OpenBD works ok.

A
--
Alex Skinner
Managing Director
Pixl8 Interactive

Tel: +448452600726
Email: al...@pixl8.co.uk
Web: pixl8.co.uk


AJ Mercer

unread,
Oct 26, 2012, 5:17:42 AM10/26/12
to ra...@googlegroups.com
I may be getting this wrong, but have you shown code that works, but need help with something else?
--

AJ Mercer
<webonix:net strength="Industrial" /> | <webonix:org community="Open" />
http://twitter.com/webonix

Michael Forell

unread,
Oct 26, 2012, 5:34:57 AM10/26/12
to ra...@googlegroups.com
Hi there,

well, yes. The mentioned example works just fine in Railo. 
The SOAP-Webservice I need to invoke for my project fails, but this is  just running locally and is not available out there. 
[btw: The getWeather example fails in OpenBD and works in Adobe CF10 with the source shown.]

I'm monitoring my internal Webservice with SOAPMonitor and can see, that railo is doing a proper request, and gets some XML back. However it seems to fail in dealing with that replied XML. 
So, that is what I need to debug and I have absolutely no idea how to do this in Railo. 

Regards
Michael 

Mark Drew

unread,
Oct 26, 2012, 5:49:11 AM10/26/12
to ra...@googlegroups.com
SOAP discussions always reminds me of this:

The errors you see are AXIS requests, when it gets to this stage, I just use the WSDL2Java library and create my own Java objects and then use that. Honestly, figuring out the above sentence is going to be quicker than trying to figure other stuff out. 

If WSDL2Java fails, then you know more. 

Railo / OpenBD / ACF can help you to a point. 

I shall see if I can do an example, but it has been so long since I did SOAP 

anyways

Mark Drew
 
Railo Technologies Professional Open Source
skype: mark_railo ma...@getrailo.com
+44 7971 852296 http://www.getrailo.com

Mark Drew

unread,
Oct 26, 2012, 5:52:49 AM10/26/12
to ra...@googlegroups.com
In fact, I was about to go write a blog post about this when I realised, I already had done that:


Regards

Mark Drew
 
Railo Technologies Professional Open Source
skype: mark_railo ma...@getrailo.com
+44 7971 852296 http://www.getrailo.com

On 26 Oct 2012, at 10:34, Michael Forell <mich...@gmx.net> wrote:

Reply all
Reply to author
Forward
0 new messages