Serialization of SOAP message in WL 7.1 (without toString)
Hi all.
I'm using Weblogic 7.1 and am trying to serialize the SOAP message I get in my
request handler to raw XML. Unfortunately since WL 7.1 only seems to support an
old version of SAAJ, that for some bizarre reason doesn't use the DOM interfaces,
the only way I can think of to do this is to call toString() on the message. Of
course I'd rather not do this since this is making assumptions about the WL implementation
of SAAJ. Can anyone think of a better way of doing this?
Since all I'm after is the raw XML anyway, would it make sense to just pass this
in as a string in the RPC call (given that my messages are likely to be fairly
big -- around 500K of raw XML)? Obviously this is a total hack, and I probably
won't end up doing it, but does anyone know of any good technical reasons why
I shouldn't do this?
Thanks.
Neil.
Hi Neil
Manoj has an WLS 7.x example passing XML without data bindings [1] that
may assist your efforts. Also see the example using handlers to get the
SOAP request/response message.
Regards,
Bruce
[1]
http://manojc.com/?wls70/sample2
[2]
http://manojc.com/?wls70/sample4
Neil wrote:
>
Hi all.
I'm using Weblogic 7.1 and am trying to serialize the SOAP message I get in my
request handler to raw XML. Unfortunately since WL 7.1 only seems to support an
old version of SAAJ, that for some bizarre reason doesn't use the DOM interfaces,
the only way I can think of to do this is to call toString() on the message. Of
course I'd rather not do this since this is making assumptions about the WL implementation
of SAAJ. Can anyone think of a better way of doing this?
Since all I'm after is the raw XML anyway, would it make sense to just pass this
in as a string in the RPC call (given that my messages are likely to be fairly
big -- around 500K of raw XML)? Obviously this is a total hack, and I probably
won't end up doing it, but does anyone know of any good technical reasons why
I shouldn't do this?
Thanks.
Neil.
Similar Messages
-
Hi All,
I need to create a web service in Workshop that sends the received SOAP message
body to a queue without mapping it to Java object i.e. the JMS message type is
text message and not Object message. I would very much appreciated if anyone out
there who can advise me on this.
Thanks in advance.
Regards,
Boon KeongHi,
Are you open for other solutions besides Workshop?
WebLogic Server provides another Web Service implementation outside of Workshop.
This web service implentation has a concept of handlers which intercept SOAP
messages. It is a way to gain access to the SOAP message. You could then route
the SOAP message to a JMS queue from the handler.
These URLs will help:
http://e-docs.bea.com/wls/docs70/webserv/index.html
http://e-docs.bea.com/wls/docs70/webserv/design.html#1053805
Also, there is an examples in the WebLogic Server 7.0 installation:
%BEA_HOME%\samples\server\src\examples\webservices\handler
hope this helps,
pat
"Boon Keong" <[email protected]> wrote:
>
Hi All,
I need to create a web service in Workshop that sends the received SOAP
message
body to a queue without mapping it to Java object i.e. the JMS message
type is
text message and not Object message. I would very much appreciated if
anyone out
there who can advise me on this.
Thanks in advance.
Regards,
Boon Keong -
Hi Experts,
Can i post SOAP message directly to integration server, without using sender soap Communication channel?
If yes how?
Thanks in advanceHi,
This will be help for you going forward with you case
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8?quicklink=index&overridelayout=true
regards
ramesh -
XML Comments in SOAP message - jax-rpc
I ran across an issue with comments in my soap messages with regards to the serialization.
My solution was to strip all the comments inbound and outbound.
Are xml comments supported by JAX-RPC? I am currently scouring the internet for more information, but the closest I have come is a reference in the IBM implementation which doesn't really help me out.
Any thoughts are appreciated.I'm trying to figure this out myself. I am using JAXM to access a web service but it wants the xml version...
-
Synchronous Proxy to Soap "MESSAGE" GENERAL /
Hi,
I try to use the SOAP HTTP (Axis) Adapter in a PI 7.1 EHP 1 to consume a web service (soap version 1.2). Itu2019s a third-party web service. when I initiate the request Iu2019m getting the following error.
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: The SOAP action specified on the message, '', does not match the HTTP SOAP Action, ' https://webservices.123456.com/Services/Versions1/DocServ/SearchDoc'.</SAP:AdditionalText>
If I test the web service with soapUI, I use the WS-A parameters u201EActionu201C and u201ETou201C and add the WS-A header to the request and it works.
Excerpt from soapUI:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ver="https://webservices.123456.com/Services/Versions1/" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action soap:mustUnderstand="1">https://webservices.123456.com/Services/Versions1/DocServ/SearchDoc</wsa:Action><wsa:To soap:mustUnderstand="1">https://webservices.123456.com/Services/Versions1/DocServ.svc</wsa:To></soap:Header>
u2026.
But without these header informations, I get the same error message like the PI-error.
My question is, what do I have to do in the PI to make it work?
Iu2019m setting the parameter SOAP Action in the PI with the same value as soapUI. The Target URL in the PI is https://webservices.123456.com/Services/Versions1/DocServ.svc.
Can you help me please?
Thank you.
BeatriceErrorCode:104 - updatePerson operation failed: Failed to create context: LDAP: error code 32 - No Such Object</
It seems that you are trying to call an updatePerson operation through the WSDL and the call is failing at this stage.
Can you check if the request send by PI is correct in structure and that the WSDL is not facing any issue (check with the end system developer). -
How to attach a DOM object as stream to SOAP message?
Hi friends,
I want to attach a parsed XML document (DOM object) to SOAP message, but but I do not want to attach it as a String, instead, I want to attach it as a binary format, given a DOM object.
Any one can help tell me what can I do for it? and what is the content type it should be?
Thanks!I knew the Java Doc API, actually I can attach text string format, but since what I want is binary data (i.e, serialize form of DOM stream), it does not seem to work as attachment.
1).if I use:
attachment.setContent(doc, "application/octec-stream");it throws:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/octec-stream
2). if I use:
attachment.setContent(doc, "application/xml");it still throws:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/octec-stream
3). if I use serailized form of the document String docString = DOMUtil.serializeDocument(doc);
attachment.setContent(docString, "text/xml");I checked the docString, which is like this form:
<?xml version="1.0"?>
<a xmlns="http://foo.org">
<b>text</b>
</a>
but it throws:
java.io.IOException: Unable to run the JAXP transformer on a stream null
3). it only works if I use serailized form of the document, and set content-type to "text/plain"
String docString = DOMUtil.serializeDocument(doc);
attachment.setContent(docString, "text/plain");Any idea what is wrong here?
Thanks! -
Plz help Error in encoding Soap Message
hii,
im new to web services ,im doing a test application using netbeans 5.5 which retrieves some information from database.Its working fine if i return eother a string or a list of strings from webservice method.
But if im using a user defined datatype as return value its giving follwing error
SEVERE: Error in encoding SOAP Message
Error in encoding SOAP Message
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:113)
at com.sun.xml.ws.handler.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:97)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:27)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:24)
at com.sun.xml.ws.handler.HandlerChainCaller.callProtocolHandlers(HandlerChainCaller.java:675)
at com.sun.xml.ws.handler.HandlerChainCaller.internalCallHandlers(HandlerChainCaller.java:444)
at com.sun.xml.ws.handler.HandlerChainCaller.callHandlers(HandlerChainCaller.java:374)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.callHandlersOnResponse(SOAPMessageDispatcher.java:448)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.getResponse(SOAPMessageDispatcher.java:307)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:601)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:141)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:333)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:288)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:88)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeJAXBBridgeInfo(SOAPEncoder.java:252)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeBody(SOAPEncoder.java:569)
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:95)
... 33 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:246)
at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:86)
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:86)
... 36 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:219)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:234)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:562)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:29)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:101)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:293)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:594)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:241)
... 39 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:474)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:557)
... 45 more
Can any body help me im struck here for the last 2 days
thnx
RAJESHAre u sure that u correctly configure Apex (marvel.conf)?
Have u include this file in httpd.conf? -
Error in encoding SOAP Message
hii,
im new to web services ,im doing a test application using netbeans 5.5 which retrieves some information from database.Its working fine if i return eother a string or a list of strings from webservice method.
But if im using a user defined datatype as return value its giving follwing error
SEVERE: Error in encoding SOAP Message
Error in encoding SOAP Message
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:113)
at com.sun.xml.ws.handler.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:97)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:27)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:24)
at com.sun.xml.ws.handler.HandlerChainCaller.callProtocolHandlers(HandlerChainCaller.java:675)
at com.sun.xml.ws.handler.HandlerChainCaller.internalCallHandlers(HandlerChainCaller.java:444)
at com.sun.xml.ws.handler.HandlerChainCaller.callHandlers(HandlerChainCaller.java:374)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.callHandlersOnResponse(SOAPMessageDispatcher.java:448)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.getResponse(SOAPMessageDispatcher.java:307)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:601)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:141)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:333)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:288)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:88)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeJAXBBridgeInfo(SOAPEncoder.java:252)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeBody(SOAPEncoder.java:569)
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:95)
... 33 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:246)
at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:86)
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:86)
... 36 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:219)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:234)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:562)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:29)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:101)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:293)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:594)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:241)
... 39 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:474)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:557)
... 45 more
Can any body help me im struck here for the last 2 days
thnx
RAJESHHello again,
because it seems to be a JavaScript issue, I opend this discussion in that forum: http://forums.adobe.com/message/6205851#6205851 -
Problem to serialise the soap message in a handler
I'm using a sun web service with a handler on the server side.
In this handler I want to analize the soap message.
First I try to serialize it :
public boolean handleRequest(MessageContext arg0) {
SOAPMessageContext context = SOAPMessageContext) arg0;
SOAPMessage mes = context.getMessage();
Document doc= mes.getSOAPPart();
OutputFormat format = new OutputFormat(doc);
format.setLineSeparator(LineSeparator.Windows);
format.setIndenting(true);
format.setLineWidth(0);
format.setPreserveSpace(true);
StringWriter sw = new StringWriter();
XMLSerializer serializer = new XMLSerializer(sw , format);
serializer.asDOMSerializer();
serializer.serialize(doc);
System.out.println(sw.toString());
}The result I get looks like that :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope><soapenv:Header>
Where are the namespaces ?
This xml is not correct because the soapenv prefix is not bound.
How can I get a correct xml from the SOAP message ?Hi,
Is ZYBTT a new attribute? Have you changed the status of the attribute to implemented or released (in SWO1: Edit -> Change release status)?
And actually I think that your syntax is wrong too (BOR world is different compared to classes). If you want to use an attribute, I think that the syntax should be something like this:
SWC_GET_PROPERTY <Object> <Attribute> <AttributeValue>.
Read more here:
http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4acef453d11d189430000e829fbbd/content.htm
Regards,
Karri -
Writting attached file from SOAP message to a FTP folder
Hi everybody,
Our scenario is an interface which receives a SOAP message with a file attached. As we don't need to do any mapping into the attachment, we are supposed to deliver that file as it is into a FTP folder.
Our problem is that we cannot find how to configure File comm channel to write the attached file and no the SOAP XML message which is what we are getting now. Any help on this?
Thanks in advance.Hi
check these forum posts
SOAP with attachments
Mail Sender Adapter - Attachment Handling
Regards
Vishnu -
Hi All,
I am using project server 2007 and WSS 3.0.
I have been facing a strange issue for couple of days. I am unable to open PWA in browser and MS Project Pro on application server.
Everything is correct whether it is URL or MS Project profile account on MSP. This is strange because i can open same PWA/MSP from other computers (Database server / Client PCs) but not locally on server.
When i try to connect to MSP on App server, i get the following errors in event viewer.
Event Type: Error
Event Source: MSSOAP
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description:
Soap error: Connection time out..
Event Type: Error
Event Source: MSSOAP
Event Category: Client
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description:
Soap error: An unanticipated error occurred during the processing of this request..
Event Type: Error
Event Source: MSSOAP
Event Category: Client
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description: Soap error: Sending the Soap message failed or no recognizable response was received.
Event Type: Error
Event Source: MSSOAP
Event Category: Client
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description:
Soap error: Unspecified client error..
One more issue i am facing and i guess that is related to above issue. The Issue is, when i am creating a new project, It's workspace gets created but doesn't get linked to the project and i can't link it manually because it already exists for the project.
sandeepHi Paul ,
Thanks for reply. The project server URL was already added to the Trusted
Sites/Local Intranet areas in IE.
sandeep -
How to get full SOAP message in WebService
hi,
Is it possible to get SOAP message while Request operation during transaction in WebService.
I tried with Handler, while retreiving message it is having a MessageContext. How to initilize that like example
public boolean handleRequest(MessageContext mc) {
SOAPMessageContext messageContext = (SOAPMessageContext) mc;
System.out.println("** Request: "+ messageContext.getMessage().toString());
return true;
}while i make a class called SoapHdlr i have implemented all methods including the above.
In that from my class if i want to call the above method i need to pass MessageContext how to give that MessageContext or any other ways to get SOAPMessage fully.
plz can any one guide me there
ThanKQI think, there are some concepts missunderstood. First if you use JAX-WS- Metro framework, this kind of handlers will work. Also you should identify your SOAPHandler for your web service. For ex: in Netbeans 6, you can right click on service and select configure handlers. Then you decide your handler.
Then automatically, Metro framework directs SOAPMessages to your SOAPHandler to handle full SOAPs. HandleMessage() method will work.
If you have problem again, just ask. -
Trying to parse a Soap Message
I'm working on creating webservices that will be consumed by
Director and working with the client programmer, we've come to
recognize the problem, but we don't know how to resolve it.
Problem: the XMLParser doesn't follow href parameters in tags
that refer to subobjects, which result in a #getProp Ref error.
I have a web service method that will return a list of names
and it returns the following XML response:
<?xml version="1.0"
encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getStudentsResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<getStudentsReturn href="#id0"
/>
</getStudentsResponse>
<multiRef id="id0"
soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
soapenc:arrayType="xsd:anyType[6]"
xsi:type="soapenc:Array" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<multiRef
xsi:type="soapenc:string">Bob B
Bobbly</multiRef>
<multiRef
xsi:type="soapenc:string">Andy A
Anderson</multiRef>
<multiRef
xsi:type="soapenc:string">Carl C
Carlson</multiRef>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
When it hits the getStudentsReturn element and tries to refer
to a child node, and obviously fails.
The server is Tomcat 5.5, using Axis 1.4 for web services. I
can post a wsdl if desired.
The web service is configured for rpc/encoded style.
What is the way to get out of this particular jam? Neither me
nor the client programmer have extensive knowledge of how Director
(or the relevant Xtra) handles SOAP messages or parse them. I've
stepped through the code and seen the XML parser object render the
response into an object tree, but it doesn't respect the href's.
I can provide follow up to any questions or comments about
this problem.
Regards,
Jeff VandenbergHi Jeff,
While I don't have much experience with web services, I'm
about to
embark on something that involves extensive use of them, so
your post
caught my eye.
If I understand correctly, the href attribute associated with
the
getStudentsReturn node is supposed to "automatically" link to
the
following multiRef array. Is that correct?
Assuming it *did* link correctly, how would this manifest
itself? Is it
not a matter of you the parser watching for href tags and
resolving them
yourself? Why would you not simply provide the multiRef nodes
as
children of the getStudentsReturn node? Is there
documentation somewhere
for the href attribute and this form of linking?
Have you tried using the Flash Asset xtra for parsing, and
does it
behave "correctly"? -
External WebService call from CAF Core returns Invalid soap message
I am trying to perform the very simple action of calling a WebService from a CAF Core app service.
1. I imported the WS (Axis Web service running on NW 2004s SP9 server) with WSDL (option 2 on import external service page).
2. I then assembled the call in an app service method and invoke it.
3. I made sure to configure the end point for the service and the method using the External Service configuration.
When I execute the CAF core method using a simple Callable Object test client, I get the following error:
com.sap.caf.mp.base.exception.EngineException: Invalid soap message received
at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.processComplexTypeMode(SOAPToMessageValueConverter.java:290)
at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.generateComplexTypeValue(SOAPToMessageValueConverter.java:179)
at
truncated.
I have also captured the XML request/reponse trace using tcpmon :
REQUEST:
POST /NWTestExpressWAR/services/TestExpressService HTTP/1.1
Host: 192.168.99.120:8078
Content-Type: text/xml; charset=UTF-8
Content-Length: 348
SOAPAction: http://www.testsys.com/TestExpressService/getAvailableModels
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:GetAvailableModels xmlns:ns1="http://www.testsys.com/TestExpressService"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
RESPONSE:
HTTP/1.1 200 OK
Server: SAP J2EE Engine/7.00
Set-Cookie: saplb_*=(J2EE11743000)11743050; Version=1; Path=/
Content-Type: text/xml; charset=utf-8
Date: Mon, 04 Dec 2006 02:19:39 GMT
Transfer-Encoding: chunked
Set-Cookie: JSESSIONID=(J2EE11743000)ID1261187150DB11296929644926762709End; Version=1; Domain=192.168.99.120; Path=/
1f3
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GetAvailableModelsResponse xmlns="http://www.testsys.com/TestExpressService"><modelNames><name>Great Oak Manufacturing-January03 Test</name><name>PriceCheck-default</name></modelNames><errorMessagesReturn/></GetAvailableModelsResponse></soapenv:Body></soapenv:Envelope>
0
The only problem I can think off is that the transfer-encoding is marked as chunked which is causing the characters '1f3' and '0' to appear after and before the response and that this is causing the app to crash.
192.168.99.120 is the server the hosts the WS. It is also a 2004s SP9 server. The client server that hosts the CAF core service is of the same configuration. 8078 is the port I redirect for tcpmon purposes.
Could anyone shed some light on my problem?
Thanks,
Pratap.It looks like NW WS client cannot handle Transfer-encoding of chunked even though this is part of HTTP 1.1. What seems to be happening is that the NW WS client is creating a HTTP 1.1 request. The service (axis ws running on NW) seeing this is creating a HTTP 1.1 response w/ chunked encoding. However, the client cannot handle this encoding and barfs. The solution is to change the service to return a HTTP/1.0 response since NW cant handle HTTP 1.1.
Pratap. -
How To : Call External Webservice from BPEL and pass SOAP Message to the WS
Hello All-
Greetings to all BPEL gurus. I am currently facing difficulties in calling an External Webservice from my BPEL Process and passing SOAP Message to it. The details are below:
<strong>1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.</strong>
<strong>2. Transform the message</strong>
<strong>3. Call the External Webservice and pass the transformed message as the input to it. However the Webservice expects the BPEL process to send SOAP headers in the input message.</strong>
I am struggling on how to put the transformed message within a SOAP envelope in the BPEL process.
If anyone had similar requirements and have successfully been able to send SOAP messages from BPEL process to an external webservice, kindly let me know.
Also if there is some kind of documentation or any link in the forum that I can refer, please let me know that as well.
I am new to Webservice integration using BPEL and would really appreciate your help.
Thanks In Advance
Regards,
DibyaHi Dharmendra,
I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
This is what I see in the TCP monitor, please note the double SOAP env:Body:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
<wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
<wsa:Metadata>
<device xmlns:hl7="urn:hl7-org:v3">
</device>
</wsa:Metadata>
</env:Header>
<env:Body>
<RCMR_IN000002NR01>
</RCMR_IN000002NR01>
</env:Body>
</RCMR_IN000002NR01>
</env:Body>
</env:Envelope>
Any help is appreciated.
Regards,
Aagaard
Edited by: Aagaard on Oct 30, 2008 8:59 PM
Should have mentioned. I am using BPEL 10.1.3.4
Edited by: Aagaard on Oct 31, 2008 8:43 AM
I have opened a new thread for this question so as to not confuse the issue more than necessary.
How many SOAP envelopes do you really need?
Maybe you are looking for
-
View in Datawarehouse environment
Hi there, Need your inputs to decide on the approach to move more than two billion rows from one table to another. The problem statement is: 1. Source and target table structures are different. So can't use Insert into ... Select statement. 2. For ev
-
JVM parameters in MANIFEST file
I deployed my Swing app in a JAR file wih the following manifest file: Manifest-Version: 1.0 Created-By: 1.4.0 (Sun Microsystems Inc.) Main-Class: MainApplication Class-Path: . jarfile1.jar ................ jarfilen.jar Everything is ok except I don'
-
How can I find the number of attachments in a message? I've done some research, but still can't figure it out :(
-
Configure Frequent visited sites in list format
Hi Internet Explorer Expert, I have a query here. Usually the frequent visited websites will be shown in series of box icon form and usually we only see 10 icons of frequently visited websites. Is it possible to change or view the those frequent vis
-
Run flex app on system startup
Hi all I have developed an app .Now what i want is that when ever the PC start the installed air app to start as the system starts.. Like the way yahoo messenger starts on system start up i want to implement that functionality ..can anybody tell me w