in my requirement i have to write a string in AQ , i have created a AQ adapter and a business service related to that now i have a variable which contains the string i have to pass, how i can paas this variable in my business service using service callout or publish ??
To pass the value in Business Service , choose service callout (sync operation) or publish (async , one way) action in Proxy message flow. Then in request actions edit the body context variable using replace (node contents) with the AQ payload (BS payload). Assign the variable where required in payload.
Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
I believe your adapter is one-way. In this case you will use the publish action.
I suggest you to create an XQuery to do the transformation, then assign it to $body.
You should be able to do this easily from Eclipse, mapping to the WSDL defined for you adapter.
Before integrating in your Proxy Service, execute the Business service from the OSB console in order to make sure that you have configured everything correctly.
I already check the business service its working fine.
and yes adapter is one way and i hve to use publish action but when i assign my paylod to the body then it doesn't write to the AQ(i checked the DB).
I presume that you checked that when invoking the business service on its own the message is inserted into the DB.
When invoking from the Proxy service, don't forget to set the Quality of Service to exactly once. See if an exception will be returned this time.
Test the Business Service as a standalone component first, if this works and you see a message in DB then you go ahead and test it from Proxy Service.
You cannot use a service callout here as this is a one way adapter.You can use publish or route node.
If you are using publish then put a log node fopr logging body in the publish pipeline .
Pass the same message to the proxy service that you passed to Business Service and see of that message reaches DB. If not then add a routing option in the publish pipline and see what is the error.
Set the Quality of Service to exactly once it doesn't show any exception in log and the message is not inserted in DB.
Now i am using service callout i changed the WSDL and add output to make it two way process now i can invoke operation from service callout but it causes an exception -
<Exception on TransportManagerImpl.sendMessageAsync: unchecked exception:, java.lang.NullPointerException
at sun.reflect.GeneratedMethodAccessor563.invoke(Unknown Source)
Before going down this path (of changing to Service Callout), you mentioned earlier: "I already check the business service its working fine.". Does this mean that you executed the Business service and you saw the message in the DB table?
Are you sure that there isn't any other Proxy Service or external process consuming the messages from the queue?
How are you replacing the body variable? Do you have an XQuery to do it? Have you compared if the result of the transformation is the same as the input you are using when invoking the Business Service on its own and "it works fine"?
this is the error i am getting when i use publish action.
<con:reason>An error occured while transforming the payload: com.bea.wli.sb.so
com.bea.wli.sb.sources.TransformException: Failed transforming to a DOMResult
at sun.reflect.GeneratedMethodAccessor1083.invoke(Unknown Source)
According to your previous post:
1) You are able to invoke the business service successfully from the OSB console, and the message was being inserted in the DB
2) When invoking the business service from the proxy service using a publish action, even with QOS=Exactly-Once, no error was being thrown, but the message was not being put into the queue
Now you are saying that you are getting that exception.
Did you compare the result of the transformation in the OSB console with the payload when you provide for the business service?
That's the only thing I can recommend, as I have no visibility of what you are doing and the payload after transformation.