Greetings. I am fairly new to webMethods and have what I suspect is a really simple problem -
only I haven’t come across the solution in any of the documentation I have read so far.
One of the requirements for the project that I am working on is to provide a
webService that takes and Xml Document as the input parameter and returns an
XmlDocument e.g. CreateOrder in OrderResponse out. It seemed fairly simple so
I ran off an created an entire flow complete with underlying business rules
only to find that the when calling the webservice I was not getting what I
expected back. In order to get a better idea of what was going on I decided
to create a simple proof of concept that took as an input a string (xmlIn)
and returned a string as an output (xmlOut).
In this POC the outPut should be exactly what was passed in, obviously this would not be the case in reality.
When I call this webService and pass in any string like “The cat in the Hat.”
everything works fine. However, if I pass a simple xml document as a string
the calling application barfs (.Net).
string xyz = “<?xml version='1.0' encoding='utf-8'?><Message source=‘String’” +
“target=‘String’ type=‘CWCreateOrder’ >”;
The first error is from duplicate document declarations - so the flow has been modified to remove
consist of only <Message source='String’target=‘String’ type=‘CWCreateOrder’ >. In the flow I have
a series of debugLog services that dump the variables values so I know that all is working as it should
within the flow.
If I keep the output from the service as a string the web service client continues to error out. When I change it
to an object all works fine. Except that I get a XmlNode array back. So in order to get the value I need to cast
the object and iterate the array ( length of 1)
string s = string.Empty;
foreach (System.Xml.XmlNode n in (System.Xml.XmlNode)obj)
s += n.OuterXml;
I also created a java client using NetBeans to see what, if any differences
are related to .net vs java in calling webMethods web services. With NetBeans I get “Access Denied”
error at runtime.
So this is a long winded of asking 2 simple questions:
- Why is it that string containing xml data is not treated as a string when returning from a webservice?
- Does anyone know how the ACL needs to be set up for a NetBeans Client. For .Net I had to change ExecuteACL to
Any insights would be greatly appreciated,