Author |
Message
|
ggriffith |
Posted: Thu Feb 19, 2009 4:36 am Post subject: SAP to Broker SOAP message |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
Anybody had experience with SOAP calls out to SAP to the broker.
We have a trace node immediately after a HTTP Input which shows data arriving as
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body>
<saprfc:GAB xmlns:saprfc="urn:sap-com:document:sap:rfc:functions">
<IN1><UNIT><NUMBER>G202</NUMBER><ADDRESS>Parkroad</ADDRESS></UNIT></IN1>
</saprfc:GAB></SOAP-ENV:Body></SOAP-ENV:Envelope>
when it should be
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body>
<saprfc:GAB xmlns:saprfc="urn:sap-com:document:sap:rfc:functions">
<IN1><UNIT><NUMBER>G202</NUMBER><ADDRESS>High Street></ADDRESS></UNIT></IN1>
</saprfc:GAB></SOAP-ENV:Body></SOAP-ENV:Envelope>
[edited for better readability of xml] |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 19, 2009 4:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm not sure I understand the question. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 19, 2009 4:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Took me a while to spot the difference in the 2 messages!
And not entirely clear what that's got to do with SOAP, SAP or the broker.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 19, 2009 4:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If the requester is sending "Park Road" instead of "High Street" in the address, this has nothing to do with the broker and all to do with the requester... Talk to your SAP folks!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ggriffith |
Posted: Thu Feb 19, 2009 4:50 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
I'm not surprised. I knew this was going to be a problem.
The forum is obviously more intelligent than the broker, as it's transformed the & # 6 0 ; to < and & # 6 2 ; to >.
I've inserted spaces to stop it doing it again
The trace actually shows
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<saprfc:GAB xmlns:saprfc="urn:sap-com:document:sap:rfc:functions">
<IN1>& # 6 0 ;UNIT& # 6 2 ; & # 6 0 ;NUMBER& # 6 2 ; G202& # 6 0 ;/NUMBER& # 6 2 ;& # 6 0;ADDRESS& # 6 2 ;High Street& # 6 0 ;/ADDRESS& # 6 2 ; & # 6 0 ;/UNIT& # 6 2 ;
</IN1>
</saprfc:GAB>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 19, 2009 4:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I still don't see the problem. The trace has escaped characters in it, which the forum parsed to character values as any parser would. Or should.
Is your problem that the broker is not doing this? Are there parser errors? Can you post them? What?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 19, 2009 5:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ggriffith wrote: |
I'm not surprised. I knew this was going to be a problem.
The forum is obviously more intelligent than the broker, as it's transformed the & # 6 0 ; to < and & # 6 2 ; to >.
I've inserted spaces to stop it doing it again
The trace actually shows
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<saprfc:GAB xmlns:saprfc="urn:sap-com:document:sap:rfc:functions">
<IN1>& # 6 0 ;UNIT& # 6 2 ; & # 6 0 ;NUMBER& # 6 2 ; G202& # 6 0 ;/NUMBER& # 6 2 ;& # 6 0;ADDRESS& # 6 2 ;High Street& # 6 0 ;/ADDRESS& # 6 2 ; & # 6 0 ;/UNIT& # 6 2 ;
</IN1>
</saprfc:GAB>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
What you seem to have is an embedded xml text in an element. and this is poorly formatted (http instead of xml?), you should have stuff like > < and stuff like that.
Can you extract the text, cast it to a blob and parse it in the broker?
You then may get the full tree...
Take it with a grain of salt... it's from memory...
Code: |
declare tempxmltxt char;
declare tempblob blob;
SET tempxmltxt to InputRoot.XMLNS.soap:Envelope.soap:Body.saprfc:GAB.IN1;
SET tempblob = CAST (tempxmltxt ...) AS BLOB;
Create Field as last child of IN1 PARSE tempblob ....; |
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 19, 2009 5:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm still waiting for something that presents itself as a problem statement or a question, rather than a set of facts. |
|
Back to top |
|
 |
ggriffith |
Posted: Thu Feb 19, 2009 5:15 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
And......... I guess I posted a bit too soon.
We just had a HTTPInput and Trace, just to see what we got, input was accepted as BLOB. Found the strange output and were wondering if the broker would parse the message, and let us access the data.
We've changed the input to the XMLNSC domain now and the trace shows
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
(0x03000102)http://www.w3.org/2000/xmlns/:SOAP-ENV = 'http://schemas.xmlsoap.org/soap/envelope/' (CHARACTER)
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body = (
(0x01000000)urn:sap-com:document:sap:rfc:functions:GAB = (
(0x03000102)http://www.w3.org/2000/xmlns/:saprfc = 'urn:sap-com:document:sap:rfc:functions' (CHARACTER)
(0x03000000):IN1 = '<UNIT><NUMBER>G202</NUMBER><ADDRESS>Parkroad</ADDRESS></UNIT>' (CHARACTER)
)
)
)
which to me still looks strange
And the questions Jeff are
This isn't right is it ?
How do we access the data when it's turned a section of the message into a string of characters ? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 19, 2009 5:16 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
How does the WSDL define the IN1 element? |
|
Back to top |
|
 |
ggriffith |
Posted: Thu Feb 19, 2009 5:24 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
There is no WSDL. Our version of SAP can't generate WSDL's for outbound messages. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 19, 2009 2:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ggriffith wrote: |
There is no WSDL. Our version of SAP can't generate WSDL's for outbound messages. |
So you need to get the SAP guys to generate a valid XML on output.
What you are displaying is a valid xml fragment assigned to IN1.
However XML syntax says that in that case the xml tags are being escaped (<, > etc...).
The question finally is what is coming across the wire and can you parse it correctly.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 19, 2009 3:07 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
which to me still looks strange |
I cannot see anything strange about this at all. The facts are:
- Tag 'IN1' in your input XML contains some text which started out as XML.
- ...but the originating application has replaced the XML markup characters with XML character entities.
- Message broker has done exactly what any well-behaved XML processor would do. It has parsed the value of tag IN1, and has translated the character entities to their actual characters.
Before you post again, please take time to think about what you need to do. Maybe that's all that is required.
If not, and you cannot find the answer after reading the product docs/using the search button then please take time (yours) to post a carefully-worded question. |
|
Back to top |
|
 |
|