Correaltionidmessage id dynamically changed

Hi,

I am dealing with commerceone adapter:
I will recive a PO from the client, after receiving the PO i have to send a PO ACK back . While sendign back the ACK the x-correclation-id,message-id are dynamically changed, even I tried with hardcoding.
Thanks in advance

Regards,
sunny

I don’t the message ID, but you need to set the POA x-correlation-id to the x-correlation-id in the PO. I assume you use TN and the CommerceOne OnRamp (C1OR). The C1OR guide install guide describes what to do in details, but here’s what we do:

-> Carry the x-correlation-ID in POA bizdoc conversation ID (i.e. map to /bizdoc/ConversationID).
-> Use wm.tn.doc:setAttribute to set two bizdoc attributes:
-----> Set requestMode = ‘peer-peer’
-----> Set ‘C1DeliveryAlias’ = Receiver’s ‘C1DeliveryMode’ TN profile extended attribute. (typically “Receiver Market”)

Hi Sonam,
Thanks a lot for your reponse…
I am using TN and CommerceOneonramp …

Q1)
Below are the steps I am following. Please let me know if I am incorrect.

  1. The XCBL data is received as STRING by one of java service and it forwads the request.
  2. XMLstring data is converted to a node and then nodeToDocument.
  3. Document is mapped to local document, converted to a string(without any headers).
  4. The xml(withou headers)is sent to TN.(Invokes Processing rule.)
  5. By using the service -wm.marketconnect.xdk.reply:createAcknoledgement i am genrating the ack
    recipientid,senderid(assigning mutually defined- TN ids)
    messageid, correlationid - extracting the above values from the PO by using a java service…
  6. pub.marketconnect.envelope:getDocumentasString
  7. wm.marketconenct.xdk.envelope:createEnvelopeFromString
  8. wm.marketconenct.xdk.envelope:EnvelopeToString

Q2) The values
Content-ID:, x-Correlation-Id:, x-Sender-Id:, x-Recipient-Id:, x-Message-Id:
in PO and the PO ack should be the same?
( because when I run the service the content-ID is chaging dynamically …)

Please let me know , if you feel this can be done in more simple way …

Regards,
Venkata Pavan

The sample PO ACk which we recived consists of same values for all the below …
Content-ID:,x-Sender-Id:,x-Message-Id:,<messageid>

i am attaching the sample with this

Ack PO
AckPO.txt (1.8 k)

By PO ACK I though you were referring to order response documents - say a xCBL 3.0 OrderResponse or a xCBL 2.0 PurchaseOrderAcknowledgement document … these are sent out some time after you receive the PO document. My earlier post referred to handling this type of asynchronous response document.

The Ack document you attached is normally automatically generated by C1OR when your tranding partner submits a document to your system as a sync ack. I think it can also be sent back asynchronously but I haven’t implemented those. I think the one major field that need to hold the same value as the PO, is the x-correlation-id. The x-sender-id and x-receiver-id would need to be opposite to those in the PO as the document is heading in the opposite direction now.

Hi Sonam,
Can you plz clarify me on the below:

Q1)
Below are the steps I am following. Please let me know if I am incorrect.

  1. The XCBL data is received as STRING by one of java service and it forwads the request.
  2. XMLstring data is converted to a node and then nodeToDocument.
  3. Document is mapped to local document, converted to a string(without any headers).
  4. The xml(withou headers)is sent to TN.(Invokes Processing rule.)
  5. By using the service -wm.marketconnect.xdk.reply:createAcknoledgement i am genrating the ack
    recipientid,senderid(assigning mutually defined- TN ids)
    messageid, correlationid - extracting the above values from the PO by using a java service…
  6. pub.marketconnect.envelope:getDocumentasString
  7. wm.marketconenct.xdk.envelope:createEnvelopeFromString
  8. wm.marketconenct.xdk.envelope:EnvelopeToString

Q2) The values
Content-ID:, x-Correlation-Id:, x-Sender-Id:, x-Recipient-Id:, x-Message-Id:
in PO and the PO ack should be the same?
( because when I run the service the content-ID is chaging dynamically …)

Please let me know , if you feel this can be done in more simple way …

Regards,
Sunny

Sunny, you’re right that it may not need to be this complicated - especially, the use of a Java service to receive documents.

WM provides a entry URL:
https://SERVER:PORT/invoke/pub.marketconnect.transport/receiveEnvelope - correctly configured, this does most of the heavy stuff for you.

From Page 37 of “webMethods B2B OnRamp for Commerce One Marketsite User’s Guide Ver 3.00”:
If the incoming envelope’s request mode is asynchronous, the handler service typically does not have to create a reply envelope. By default, when no errors occur duing processing, OnRamp returns a reply envelope to MarketSite that contains a defult acknowledgement. If you want to create a custom acknowledgement, call the createAcknowledgement service;

In the header of the reply envelope, use the correlationID from the header of the incoming envelope

hi Sonam,
Thanks for u r time…
have a couple of issues …could you please clarify me reagrding below questions :

1 ) Requirment is …I will receving the XCBL file as a STRING and I have to send the response as a STRING. I cant send the reposne directly to client. There is one more server(websphere) in between client and webemthods, which redirects the XCBL string to webMethods.
So i am following the above mentioned way…
Could you please let me know whthere the way i mentioned is completly wrong or we can do it in a better way…as I have finished developing the services by using the above complicated path… :frowning:

2 )I am getting the below error when I tried to submit a document…


Error parsing document. reasons include: org.xml.sax.SAXParseException: <error>Could not find file: /D:/Sandbox/webMethods/IntegrationServer/…/…/XCBL2.0/Distrubtion/xcblcomp/cbl.xdr/com/commerceone/CBL/n1_0/CBL.sox</error>CommerceOne, org.xml.sax.SAXParseException: <fatal>file:///D:/Sandbox/webMethods/IntegrationServer/dummysystemid:5:20: SOX schema could not be loaded: due to previous errors.</fatal>CommerceOne, org.xml.sax.SAXParseException: <fatal>file:///D:/Sandbox/webMethods/IntegrationServer/dummysystemid:5:20: Due to previous errors document is not valid.</fatal>CommerceOne, org.xml.sax.SAXParseException: <fatal>Cannot continue due to previous errors.</fatal>CommerceOne, org.xml.sax.SAXParseException: <fatal>file:///D:/Sandbox/webMethods/IntegrationServer/dummysystemid:5:20: Cannot validate document without a schema.</fatal>CommerceOne, org.xml.sax.SAXParseException: <fatal>file:///D:/Sandbox/webMethods/IntegrationServer/dummysystemid:5:20: Due to previous errors document is not valid.</fatal>CommerceOne, org.xml.sax.SAXParseException: <fatal>Cannot continue due to previous errors.</fatal>CommerceOne


Regards,
Sunny

Sunny:

  1. If webSphere is directly acting as a transparent proxy it should make no difference, but I certainly recommend you deal directly with CommerceOne clients at least when you’re finishing development - keep get to a ‘known good’ position before adding complexity. Re: your complicated way, I can’t help you as I haven’t done it myself Sunny.

  2. The error you are seeing is a validation error - your C1OR is set to validate documents (this is good) but cannot validate them as it cannot load the schema. Go to your OnRamp interface and check this section: ‘C1 OnRamp > xCBL Validation’ has this field value:

Schema Path = ‘packages/WmxCBL/schema’

Hi Sonam

Thanks a lot for the detailed info.

Regards,
Sunny

You’re welcome man - best of luck