Home Page › Forums › BizTalk 2004 – BizTalk 2010 › SOAP adapter returning Worng response
- This topic has 8 replies, 1 voice, and was last updated 9 years, 6 months ago by
community-content.
-
AuthorPosts
-
-
April 8, 2008 at 12:34 PM #19287
Hi,
I am running in to an issue where I am unable to fetch the proper response sent by a remove server’s API when I call it from my machine. The response as looked from Fiddler installed on my machine looks as per my requirements but when I see it after being processed through a receive passthrough or xml receive pipeline, it changes and its not picking the right message. Below are both the messages, the one I see in Fiddler i.e. being sent from the other server and also how it looks like after getting processed through Biztalk SOAP adapter:-
From Fiddler:-
<?xml version=”1.0″ encoding=”UTF-8″?>
<env:Envelope xmlns:env=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:enc=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:ns0=”http://namespaces.nextance.com/nex/eai”><env:Body><getPartyByKeyResponse xmlns=”http://namespaces.nextance.com/nex/eai”><status>Completed</status><messageId>nex-eai:ddb4de21-c52c-1004-8099-00065b29ae40</messageId><result><party docType=”party” objectId=”2040″>
<sysAudit>
<createDate>2008-04-03 13:34:20</createDate>
<createdBy>nextsa</createdBy>
<updateDate>2008-04-03 13:34:20</updateDate>
<updatedBy>nextsa</updatedBy>
<updateCount>0</updateCount>
</sysAudit>
<name>IWS-ONE-CREATE-ONE</name>
<description>IWS-ONE-CREATE-ONE-description</description></party></result></getPartyByKeyResponse></env:Body></env:Envelope>
After Passing Through SOAP Adapter:-
<?xml version=”1.0″?>
<GetPartyByKeyResponse xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://namespaces.nextance.com/nex/eai”>
<status xmlns=””>Pending</status>
<result>
<party docType=”party” objectId=”2040″ />
</result>
</GetPartyByKeyResponse>Also, I tried to trigger the Web API through C# code but still with no success. In the fiddler it says that the server responded with Success= Completed but when I see if after passing through Biztalk I see it as Status = Pending.
Also, I had a look at the web api schemas and they have an encoding of utf-16 but the response that i am getting is in utf-8 format, could that be the reason for the discrepencies.
Any help would be really appreciated.
Thanks!
-
April 9, 2008 at 10:54 AM #19293
Dear,
we need to learn more about your application architecture in order to help you,
Does your application contains a SOAP receive location that receives web requests from another server?
Did you try changing transport type of the receive location from SOAP to FILE and checked the output file?
What is the receive location SOAP configuration? Can you post the exported application binding file?
Thanks,
Mike
-
April 9, 2008 at 12:03 PM #19294
Thanks! for replying so soon Mike,
Q:- Does your application contains a SOAP receive location that receives web requests from another server?
A:- No, I have a solicit response port for calling(consuming) a web-service from my Orchestration. I send a request out to the Nextance Server(which is a third party tool that we are using to store the customer agreements) through one of its API’s that they have exposed as web-services. I see the correct response coming back from that server in my machine but after getting processed from the Biztalk SOAP port it gets, it gets distorted.
Q:- Did you try changing transport type of the receive location from SOAP to FILE and checked the output file?
A:-I haven’t tried changing the transport type as I am using the bindings as specify now in my Orchestration and choosing the default values they have put for the Web-Service port.
Q:- What is the receive location SOAP configuration? Can you post the exported application binding file?
A:-The SOAP configuration is simple. I have tried using the Pass-through as well as an XML-Transmit file but m still getting the same response.
The whole architecture is just like Communicating with a server through its exposed API’s. So we add the reference to the Web-services and call a particular operation in the web-service which in this case is the GetPartyByKey and we wait for the response, using the default settings for the Web-service port binding.
Also, since its a Java based product(Nextance) that we are intigrating with and their schemas as looked from the visual studio have an encoding of utf-16 but when I see the response coming back it is utf-8 encoding. could this cause some problems. Also, the response that I see after getting processed through Biztalk doesn’t have any encoding at all, as seen in my first blog. Also, since I am consuming the schemas that are exposed through their on API’s and waiting for a response corresponding to a particular response schema in their web-service, is it still possible that Biztalk is not able to validate the response coming back from their server against the schema.
Because as far as my understanding goes, it shouldn’t be a problem as its their own schema and if their is some discrepency then its from their side, but m not sure about it and rightnow we have all the blame being put on Biztalk for picking the wrong response, even though I get the same response from a C# code.
Thanks!
Ashish
-
April 10, 2008 at 1:32 PM #19302
Has any one ever faced such a scenario?
-
April 11, 2008 at 1:39 AM #19303
Hi Ashish,
first of all we need to trap the messages with a ver simple tool like SOAP ToolKit, it will help zoom in to the SOAP messages only.
secondly, I need to ask one more question, Is <sysAudit> XML element required element? i.e.: can it a valid XML instance of this XSD discard <sysAudit> totally?
one more thing, in your original post, the two messages are totally different unless your application modifies the status from “Completed” to “Pending” automatically.
Cheers,
Mike
-
April 11, 2008 at 11:09 AM #19311
Hi Mike,
I have installed the SOAP tool kit 3.0 . But how do u want me to use this kit. <sys audit> is not a required element. Also the status attribute is being modified automatically.
Thanks!
Ashish-
April 11, 2008 at 12:36 PM #19312
Mike,
The schema that I have corresponds to the message in the envelope body of the First messsage that I have put in my first blog. What I belive is that Biztalk is unable to remove the SOAP envelope coding from the incoming message and this results in validation failure and hence improper message output.
The response coming back as seen from Fiddler which is also another HTTP debugger tool:-
<?xml version=”1.0″ encoding=”UTF-8″?>
<env:Envelope
xmlns:env=”http://schemas.xmlsoap.org/soap/envelope/”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:enc=”http://schemas.xmlsoap.org/soap/encoding/”
xmlns:ns0=”http://namespaces.nextance.com/nex/eai”><env:Body><getPartyByKeyResponse
xmlns=”http://namespaces.nextance.com/nex/eai”><status>Completed</status><messageId>nex-eai:ddb4de21-c52c-1004-8099-00065b29ae40</messageId><result><party
docType=”party” objectId=”2040″>
<sysAudit>
<createDate>2008-04-03 13:34:20</createDate>
<createdBy>nextsa</createdBy>
<updateDate>2008-04-03 13:34:20</updateDate>
<updatedBy>nextsa</updatedBy>
<updateCount>0</updateCount>
</sysAudit>
<name>IWS-ONE-CREATE-ONE</name>
<description>IWS-ONE-CREATE-ONE-description</description></party></result></getPartyByKeyResponse></env:Body></env:Envelope>
Web-Service Schema as Deployed on my machine :-
<?xml version=”1.0″ encoding=”UTF-8″?>
<getPartyByKeyResponse
xmlns=”http://namespaces.nextance.com/nex/eai”><status>Completed</status><messageId>nex-eai:ddb4de21-c52c-1004-8099-00065b29ae40</messageId><result><party
docType=”party” objectId=”2040″>
<name>IWS-ONE-CREATE-ONE</name>
<description>IWS-ONE-CREATE-ONE-description</description></party></result></getPartyByKeyResponse>
The response as seen after passing through SOAP adapter in Biztalk:-
<?xml version=”1.0″?>
<GetPartyByKeyResponse
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
xmlns=”http://namespaces.nextance.com/nex/eai”>
<status xmlns=””>Pending</status>
<result>
<party docType=”party” objectId=”2040″ />
</result>
</GetPartyByKeyResponse>Do you think that if Biztalk is not able to validate the response coming bac, so it might show the default values for the Status node because the STATUS node is enumerated as PENDING,ERROR,COMPLETED. I was thinking Biztalk is just picking the PENDING as response since it is the first in the list of enumerations.
Another thing to note in the response is that the three fields that Biztalk is picking up (status,docType and objectId) are all attributes and not elements, does that ring a bell.
I really appreciate your support on this. I am just struck in this and need to get the solution to this by Monday Morning.
Thanks!
Ashish-
April 13, 2008 at 1:29 AM #19319
Hi Ashish,
It’s not a difficult job for BizTalk to extract the message body from the SOAP envelope,
what I’m suspecting is, the message specification (i.e: web service response schema) has changed on nextance after you deployed the BizTalk application. to check this, make sure you update the web reference in the BizTalk soln to get the latest schema.
Mike
-
-
April 12, 2008 at 3:32 AM #19316
Hi Ashish,
since your application is consuming a web service (on nextance), you may intercept/view requests and responses exchanged with this web service using the toolkit.
All you have to do is to configure the BizTalk Send Port that consumes the Web service such as it points to the SOAP toolkit instead of the nextance server,
http://localhost:8080/Nextance.asmx instead of http://[NextanceServer]:80/Nextance.asmx
In the SOAP Toolkit, configure it to listen to port 8080 on localhost, and redirect to NextanceServer:80
by doing this, you should view requests and responses coming from the nextance server before BizTalk “alters” it
let me know if this helps,
Mike
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.