Issue with passing an XML document to Trading Networks

Hello.

im trying to post SAP XML document to TN. Our external vendor uses the following URL:

http://as-esb-01t.jenoptik.corp:5556/invoke/joAppEDI.services/InboundXML. The service
has only one input parameter called “node”. Type object. Node is mapped to service “wm.tn.receive” param node.

The xml document should be passed via POST.

I’m using for testing purposes the following wget command:

wget “http://as-esb-01t.jenoptik.corp:5556/invoke/joAppEDI.services/InboundXML” --post-file=“xmlTestFile.xml” --header=“Content-Type:text/xml”

But TN receives no xml document, but only bytes, small size (e.g. 552) and type “application/x-wmidatabin”.
Content is :

c o m . w m . u t i l . V a l u e s c o n t e n t T y p e a p p l i c a t i o n / x m l
c o n t e n t L e n g t h 1 4 0 1 6 s t r e a m w m . E D I I N T . S e q u e n c e I n p u t S t r e a m p r o t o c o l h t t p i p I n f o a l o c a l I p 1 0 . 1 1 0 . 2 . 1 5 1 l o c a l P o r t 5 5 5 6 r e m o t e I p
1 0 . 7 2 . 8 . 7 8
r e m o t e P o r t 6 1 2 0 9 T N _ p a r m s c o m . w m . d a t a . I S M e m D a t a I m p l $ c o n t e n t T y p e $ c o n t e n t E n c o d i n g

But i need the XML document here.

Output of wget :
–2013-10-21 16:44:14-- http://as-esb-01t.jenoptik.corp:5556/invoke/joAppEDI.se
rvices/InboundXML
Resolving as-esb-01t.jenoptik.corp… 10.110.2.151
Connecting to as-esb-01t.jenoptik.corp|10.110.2.151|:5556… connected.
HTTP request sent, awaiting response… 401 [ISS.0084.9004] Access Denied
Connecting to as-esb-01t.jenoptik.corp|10.110.2.151|:5556… connected.
HTTP request sent, awaiting response… 200 OK
Length: 0 [application/EDIINT]
Saving to: `InboundXML.6’

[ <=>                                   ] 0           --.-K/s   in 0s

2013-10-21 16:44:14 (0,00 B/s) - `InboundXML.6’ saved [0/0]

Am I doing wrong ? How can i pass a xml document to TN using the “Landing Service” for our vendor ?

I attached the used XML Testfile.

Thanks for your help.

Sebastian
xmlTestFile.xml (13.7 KB)

Before you hit to the TN make sure you have node as input to your service and also try xmlnodetodocument and savepipelineToFile right after that call and disable tn:receive step untilyou are comfortable that XML being received properly and they should set content-type=text/xml for the *node input to work properly.

HTH,
RMG

Hello RMG,

ok. i set *node as Input and mapped it to xmlNodeToDocument. permission for Service InboundXML is set to Administrators.

When i try to pass the XML document via POST with wget command to the Service i get the following result.
I’m not quite sure why wget is telling me, that there is an “Access denied”, but in second step it seems as
if a connection was successful.

D:\EDI\TN>wget “http://as-esb-01t.jenoptik.corp:5556/invoke/joAppEDI.services/In
boundXML” --user=“Administrator” --password=“manage” --post-file=“xmlTestFile.xm
l” --header=“Content-Type:application/xml”
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
–2013-10-22 07:25:25-- http://as-esb-01t.jenoptik.corp:5556/invoke/joAppEDI.se
rvices/InboundXML
Resolving as-esb-01t.jenoptik.corp… 10.110.2.151
Connecting to as-esb-01t.jenoptik.corp|10.110.2.151|:5556… connected.
HTTP request sent, awaiting response… 401 [ISS.0084.9004] Access Denied
Connecting to as-esb-01t.jenoptik.corp|10.110.2.151|:5556… connected.
HTTP request sent, awaiting response… 200 OK
Length: 0 [application/EDIINT]
Saving to: `InboundXML.9’

[ <=>                                   ] 0           --.-K/s   in 0s

2013-10-22 07:25:25 (0,00 B/s) - `InboundXML.9’ saved [0/0]

And result from SavePipeLineToFile is ( see file edi.xml attached)

Is there maybe another way for testing Passing a XML document via post to an IS Service ?

Thanks.
Sebastian


edi.xml (581 Bytes)

OK you need to make that gateway service to Execute ACL to Anonymous and you won’t get access denied:

HTH,
RMG

Hi RMG,

ok, in wget command i’d set Parameter --auth-no-challenge. So this works.

But it seems that my IS Service does not recognize the content of http-post Body.

I get the following error when calling the service with wget. But i get no error when
calling the service directly from designer it works.

[ISS.0086.9091] Parameters xmldata, $filestream and $filedata are all missing. One of these must not be null.
Caused by: com.wm.app.b2b.server.ServiceException: [ISS.0086.9091] Parameters xmldata, $filestream and $filedata are all missing. One of these must not be null.

Is there a way to get the http-post Body part in the IS by e.g. XQuery ?

Thanks,
Sebastian