ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Wrong soap reply message

Post new topic  Reply to topic
 Wrong soap reply message « View previous topic :: View next topic » 
Author Message
wmqstankela
PostPosted: Thu Jan 31, 2019 6:27 am    Post subject: Wrong soap reply message Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

Hi all,
I'm using IIB 10.0.0.10 on Linux.
I've implemented soap service that invokes another soap service. Problem is with this external service, because in some situation it return wrong element in response. For example in wsdl it says that response element is element1, but in some cases service response with element2 which is same type as element1. Everything inside that element2 is the same as in element1 but it's not name that IIB is expecting based on wsdl from that external service.

When I use SOAPRequest node, it throws exception when element2 is in response. I tried to use HTTPRequest, but there is another problem. Case when element2 occurs is when response is multipart message with pdf attachment, and XMLNSC or other parsers in HHTPRequest node can't parse that message. Exception is thrown "An invalid XML character was found..."

I can't change that external service. I need to find a solution for this. Can someone help me with this?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jan 31, 2019 7:13 am    Post subject: Re: Wrong soap reply message Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wmqstankela wrote:
I can't change that external service. I need to find a solution for this. Can someone help me with this?


No - you're doomed.

You've got an external service which doesn't conform to it's WSDL, and doesn't send valid XML in all cases, assuming you've correctly split the multipart into body & PDF attachment.

I have in fact been exactly where you are, except we didn't have a multipart and the external service was sending stone cold invalid XML (special characters not escaped). Apparently they didn't use an XML parser to serialize the message, just concatenated some strings together and used the WSDL "as an example of the sort of responses we send".

We used an HTTPRequest node, kuldged the response as a BLOB and scanned it for invalid XML characters as hex, replacing them as needed. It worked 85% of the time and we fixed the external service by finding a vendor who had a idea what they were doing.

Go in peace.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Jan 31, 2019 9:01 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

You could try using the SOAPRequest Node in "gateway mode" where it will not enforce a match against the WSDL. As long as the response is a valid SOAP message (even with attachments) then it should be able to handle it.

If it's not always valid SOAP or SOAP-with-attachments, you could try an HTTPRequest Node with the MIME parser if it always has attachments or failing that use the BLOB parser and handle it manually...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
mpong
PostPosted: Thu Jan 31, 2019 10:43 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Quote:
You could try using the SOAPRequest Node in "gateway mode" where it will not enforce a match against the WSDL

Exactly what I have done in the past.

Also, when we expose a service, it is worthwhile to ask the developers to validate a response at our end. For example a simple SOAP UI response validation.
Back to top
View user's profile Send private message
wmqstankela
PostPosted: Fri Feb 01, 2019 5:46 am    Post subject: Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

Thanks mgk! It solves a problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Wrong soap reply message
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.