Hi All,
My vendor is trying to post a XML request string to my service on IS 6.5. We have exchanged the certificates and everything is fine. They come in and I see a hit on my IS, the input in the pipeline is string called as requestXML, nothing comes in it and it goes to catch block saying that xmldata cannot be null.
com.wm.app.b2b.server.ServiceException: [ISS.0086.9091] Parameters xmldata, $filestream and $filedata are all missing. One of these must not be null.
They say that they have set Content_type to text/xml and below is the snippet from thier client program:
post.addRequestHeader(“Authentication”, “XYZ:ABC”);
post.setRequestHeader(“Content-type”, “text/xml”);
HttpClient httpclient = new HttpClient();
There is an Execute ACL on my service and they have added the login credential for XYZ user in Authentication as above.
They get Access Denied error, so I have removed the Execute ACL and changed it to Anonymous.
Thats a different issue. First I have to crack why thier request is coming in as NULL or BLANK in my service.
The service input is not a node, but a simple string called as requestXML. Again, its not a node but a string.
My first step in service is XMLStringToXMLNode.
So I am expecting a string and not a node.
There is another vendor that is using this same service and it works for them. I expect the XML string to come in requestXML string.
I know what the issue, this service was initially designed for one vendor, who posted a XML as string to the service. So the first step I have in my service is XMLStringToNode.
But this new vendor now post the XML as node to the service. I tested by disbaling the XMLStringToNode and having the XMLNodeToDocument as first step and its working fine.
Now how should the new client post, such that I get input as XML string and not as a node.
The old client is already in production and i dont want to touch the code. I have to ask the new client to change the way it send the XML.
If you still want to use the one gateway service Yes you should request TP to send it similar to other TP sends it…Other option is create a separate service to handle the new TP and so forth:
But in your initial setup did you ask TP’s to send requestXML string in the http request as argument?..thats why you are not seeing node object by default:
Hi RMG,
Thanks for the reply. TP1(from whom i am getting XML in string"requestXML") is already in production.
TP2 is in test, so my preferable option is not to ask TP1 to chnage and ask TP2 to send the request as TP1(i.e in string “requestXML”, rather than in node).
Other wise I have to go for code change. i was looking for more option where TP2 would just post the XML and i would come in pipeline in “requestXML” string rather than “node” object.
I confirmed with TP2 and they said that they are posting XML as string and Content-Type as “text/xml”
What if they change the Content-Type to “text/plain”? Will the data posted to my service come in “requestXML” string?
Name/value pair wouldn’t be via POST. It is a GET.
What is the insistence on getting the variable name “requestXML” to your service? The IS content handler does the XMLStringtoNode conversion for you automatically when the POSTed content type is text/xml or application/xml. What’s driving you to want the string?
He is getting node object from TP2 while content-type is text/xml and which is expected but sounds their request to TP1 to send requestXML per their initial design may be they support only GET who knows:)
got that. but to get XML String in pipeline, the partner must send the name-value pair with Content-Type text/plain (text/xml will get converted to “node” by IS contenthandler).
i’m just thinking to skip the XMLStringToNode step if the node is already available in pipeline, which will be the case for http post with content-type text/xml.
This would mean a change to the service already in Production, a quick n dirty solution is to whip up a 2 second wrapper service that merly converts from the xml node to xml string then invokes the Production service which is expecting the string.