Parse SOAP messages
Hi,
I would like to know how efficient would be to use Oracle Text to parse SOAP messages. The body of the SOAP messages are heterogeneous in terms of format and size (smallest messages is about 20 lines, biggest message is about 200 lines). The number of records to parse is approximately one hundred thousand every hour.
Thank you.
In what sense do you want to "parse" them? Do you just want to find individual strings in the SOAP messages, or are you looking to fully interpret the meaning and content of the SOAP messages? If it's the second of these, then Oracle Text is not the right solution - you could perhaps look at Oracle XML Database instead.
Similar Messages
-
Parsing Soap Message Exception
In my environment, flex looks like unable to parse soap
message if MTOM and SWA of my web services were enabled. Can anyone
help me?Which version of Flexbuilder are you using? FB2.01 just
support SOAP 1.1,or am I wrong?
What exactly do you mean with SWA (seems not to be any
offical shortterm of w3c)?
best regards
kcell -
Error when parsing SOAP message from JSP
i write a class to call SOAP message from a servlet on jdev 1013
when i run the class alone it works fine
soapMessage = this.buildSOAPMessagee();
ByteArrayOutputStream output = new ByteArrayOutputStream();
soapMessage.writeTo(output);
SOAPConnectionFactory connf = SOAPConnectionFactory.newInstance();
SOAPConnection conn = connf.createConnection();
SOAPMessage smsg= conn.callsoapMessage, "http://190.0.0.16:8988/mmsc/httpReceiver");
smsg.writeTo(out);
but when running same class same method from jsp page...i have Exception
javax.xml.soap.SOAPException: Unable to get header stream in saveChanges at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:576) at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:622) at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:686) at oracle.j2ee.ws.saaj.soap.MessageImpl.writeTo(MessageImpl.java:702) at test.test2.ret(test2.java:341) at untitled1.jspService(_untitled1.java:45) [untitled1.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230) at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298) at java.lang.Thread.run(Thread.java:595)Caused by: java.io.IOException: SOAP exception while trying to externalize: Error parsing envelope: (1, 1) Start of root element expected. at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:220) at oracle.j2ee.ws.saaj.soap.MessageImpl.getHeaderBytes(MessageImpl.java:522) at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:574) ... 23 moreCaused by: javax.xml.soap.SOAPException: Error parsing envelope: (1, 1) Start of root element expected. at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:104) at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:76) at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:215) ... 25 moreCaused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:333) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201) at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:78) ... 27 more
dose anybody can help why that happend when running the code from JSPi write a class to call SOAP message from a servlet on jdev 1013
when i run the class alone it works fine
soapMessage = this.buildSOAPMessagee();
ByteArrayOutputStream output = new ByteArrayOutputStream();
soapMessage.writeTo(output);
SOAPConnectionFactory connf = SOAPConnectionFactory.newInstance();
SOAPConnection conn = connf.createConnection();
SOAPMessage smsg= conn.callsoapMessage, "http://190.0.0.16:8988/mmsc/httpReceiver");
smsg.writeTo(out);
but when running same class same method from jsp page...i have Exception
javax.xml.soap.SOAPException: Unable to get header stream in saveChanges at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:576) at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:622) at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:686) at oracle.j2ee.ws.saaj.soap.MessageImpl.writeTo(MessageImpl.java:702) at test.test2.ret(test2.java:341) at untitled1.jspService(_untitled1.java:45) [untitled1.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230) at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298) at java.lang.Thread.run(Thread.java:595)Caused by: java.io.IOException: SOAP exception while trying to externalize: Error parsing envelope: (1, 1) Start of root element expected. at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:220) at oracle.j2ee.ws.saaj.soap.MessageImpl.getHeaderBytes(MessageImpl.java:522) at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:574) ... 23 moreCaused by: javax.xml.soap.SOAPException: Error parsing envelope: (1, 1) Start of root element expected. at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:104) at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:76) at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:215) ... 25 moreCaused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:333) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201) at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:78) ... 27 more
dose anybody can help why that happend when running the code from JSP -
Creating, Sending, Receive + Parsing SOAP messages
Hi all
I have a requirement to set up a system to send and receive SOAP messages. I googled for some tutorials and found one that used an Apache library. But I also see that Java 6 has got quite a bit of SOAP built-in. Are the built-in SOAP classes ready for prime time or should I use apache?
If anyone has a code snippet they could post that would also be appreciated.JAX-WS (which is part of Java 6) is definitely ready for prime time.
It's also a whole lot easier to use.
I'd definitely go with the JAX-WS route. -
How to parse a entire SOAP Message
It seems that there is no API in JAXM for parse a entire SOAP Message.
And how to set encoding of a SOAP Message?I can use Apache SOAP for parsing before. There is a class named
Envelope that has a method unmarshall(Element). So I can parse
SOAP message as a common DOM, then change to SOAP Message
using unmarshall. But in JAXP/JAXM, there is no such a class to work. -
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"? -
Receiving and parsing a SOAP Message
Hi All.
I have just installed the JAXM package, cause I want to programm a network message broker using SOAP. The server code is written in C# and I tested it. All messages are send and processed via SOAP and it all works.
So I now want to try to receive these messages with a JAVA program. But when I looked up the API I didnt find any class or method for only receiving SOAP messages. I guess that I have overlooked the part where this is explained, or I got something wrong. But I would be grateful, if anyonle could tell me if and how this will work.
Thanx in advance,
ChristianHi
To get a service to only receive messages you must use a class that implements Onewaylistener, and this class must be supported in a container environment e.g. servlet or J2EE container. It defines one method, public SOAPMessage onMessage(SOAPMessage) which is called by the container when it receives a message. For example say I want to create a servlet that receives SOAP messages for a purchasing application
public class PurchasingServlet extends JAXMServlet implements
OnewayListener{
public SOAPMessage onMessage(SOAPMessage message){}
The JAXMServlet is a helper servlet to handle SOAP messages but it is not necessary to implement.
Hope this helps. -
Incoming soap message not parsed
From a BPEL process I invoke a web service deployed on the oc4j containers of JDev 9.0.4.
The SOAP message looks like this:
<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>
<ns1:invokeMethod soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://acm.org/samples">
<paramsXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:string">
<Parameters>x<ParameterName></ParameterName><ParameterValue>y</ParameterValue></Parameters>
</paramsXML>
</ns1:invokeMethod>
</soapenv:Body>
</soapenv:Envelope>
The java class that implements the web service (it expects a String argument) gets an empty String instead of the contents of paramsXML above. What is going wrong?If you want to use raw XML using xsd:string with an RPC-Encoded service developed using a java String as a parameter, you will have to encode your XML on the sender side.
The request should looks like this:
<?xml version = '1.0' encoding = 'UTF-8'?>
<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" xmlns:ns0="http://acm.org/samples">
<env:Body>
<ns0:invokeMethod env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<paramsXML xsi:type="xsd:string">
& l t ;Parameters>x& l t ;ParameterName>& l t ;/ParameterName>& l t ;ParameterValue>y& l t ;/ParameterValue>& l t ;/Parameters></paramsXML>
</ns0:invokeMethod>
</env:Body>
</env:Envelope>
note that the '<' are replaced by the '& l t ;' entity in the request {with extra space in the entity to render here}. -
some help is required on the SOAP processing
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<getPricedAvailability xmlns="http://www.openuri.org/" xmlns:tget="http://www.ba.com/schema/tGetPricedAvailabilityV1">
<tget:GetPricedAvailabilityRequest>
<Name>ian</Name>
....i need to add a tag name[in between the two tags] <asl>US </asl>
<age>1234</age>
</tget:GetPricedAvailabilityRequest>
</getPricedAvailability>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope
Can any one suggest or send me the piece of code which does this..
i tried to add the tag by using the below code but in vain it didn't happen ...it is not adding in between the 2 tags.
it is adding after <age>.... Can any one help me in this...Is there is any other way of parsing the SOAP message is possible
SOAPMessageContext smc = (SOAPMessageContext)mc;
SOAPMessage sm = smc.getMessage();
SOAPEnvelope env = sm.getSOAPPart().getEnvelope();
SOAPBody body = env.getBody();
javax.xml.soap.Name sName;
System.out.println(" Entering callEndTag #########################################");
System.out.println("body"+body +" "+"env"+env);
if ( body != null ){
java.util.Iterator childElems = body.getChildElements();
SOAPElement child;
int i=0;
// iterate through child elements
while (childElems.hasNext())
System.out.println("childElems" +childElems);
Object elem = childElems.next();
System.out.println("elem" +elem);
if(elem instanceof SOAPElement )
// get child element and its name
child = (SOAPElement) elem;
sName = child.getElementName();
if (sName.getLocalName().equals("getPricedAvailability"))
childElems = child.getChildElements();
while (childElems.hasNext())
// get next child element
elem = childElems.next();
if(elem instanceof SOAPElement )
child = (SOAPElement) elem;
sName = child.getElementName();
if (sName.getLocalName().equals("GetPricedAvailabilityRequest"))
{childElems = child.getChildElements();
sName = child.getElementName();
System.out.println("SNAME inSIDE IF LOOP" +sName);
System.out.println("If Elem is a) instance ====After");
if (childElems.hasNext())
// get next child element
elem = childElems.next();
System.out.println("If Elem is a) instance == before");
if(elem instanceof SOAPElement )
System.out.println("If Elem is a) instance ====After");
System.out.println("before type cast" );
child = (SOAPElement) elem;
sName = child.getElementName();
System.out.println("Start adding process added end date" +sName);
SOAPElement fResponse12 = child.addChildElement(env.createName("EndDate-- ==child "));
fResponse12.addAttribute(env.createName("xmlns"),
fResponse12.addTextNode(strEndDate );
((SOAPMessageContext)mc).setMessage(sm);Hi Experts,
I'm trying to protect a web service deployed in jcaps 5.1.1, using SAML assertions against an Access Manager 7/7.1, the web services clients are both, web and standalone applications, I also have read netbeans tutorials, that expose how to implement identity webservices using AppServer 9.1 + AccessManager 7.1 using the SAML Holder of key and other security mechanisms, but this implementation requiere modifications to the server.policy file to add support to SOAP message security providers and HttpServlet message security providers, the addition of a library called amwebservicesprovider.jar to the classpath suffix (this library implements the jsr-196 java Authentication Service Provider Interface for Containers) and aditional configuration required in the AM side that is not detailed in the tutorials.
Could someone guide me on how to protect the acces to a web services deployed in the jcaps logicalhost based on AM roles assigned to users?
Any help is aprecciated
Juan -
Hi,
We receive a soap message with the characters "<" and ">". The soap adapter is unable to parse this as "<" and ">". Is there a way to translate "<" to "<" without creating an adapter module?
Thanks.Hi Sunil,
The input payload is similar to the below
<Request xmlns="http://test.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<RequestResult><ACKNOWLEDGEMENT VALUE="no"><ERROR_CODE="test"/></ACKNOWLEDGEMENT></RequestResult>
</Request>
The string value is sent for the values in node, RequestResult.
The output has to be the exact same but instead of the "& lt ;" and "& gt ;" represented in the node, RequestResult, it needs to be translated to "<" and ">" xml nodes and not string values.
Thanks for your help.
Best Regards. -
How to access SOAP message using JAXP and SOAP class?
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder b = factory.newDocumentBuilder();
FileInputStream fr = new FileInputStream(args[1]);
Document doc = b.parse(fr);
Envelope msgEnv = Envelope.unmarshall (doc.getDocumentElement()); <---
the exception raised:
java.lang.IllegalArgumentException: Root element of a SOAP message must be: 'htt
p://schemas.xmlsoap.org/soap/envelope/:Envelope'
And the xml file is:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"...>
</env:Envelope>The problem is that your DocumentBuilderFactory is not set to be namespace aware. If add a call to factory.setNamespaceAware(true) that should fix your problem.
-
MessageId missing in SOAP message header
I am trying to execute a SAP (IDoc) -> XI -> SAP (ABAP Proxy). The SAP machines are 6.2, the XI machine is 6.4. I have generated and tested the ABAP proxy, works without issue. Per previous threads I also tested the message mapping in the repository, also works successfully. When I review the SXI_Monitor in XI, the message is received successfully, mapped successfully, but errors in the Adater Call step. There is no message listed as received in the sxi_monitor on the recevier SAP system. Error Message is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
<SAP:P1>/MessageHeader/MessageId</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>XML tag /MessageHeader/MessageId missing in SOAP message header (SAP XI Extension)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Looking at the message in the monitor it does have a message id assigned. Only other interesting thing is in the trace section where it says :
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
<Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
All other messages are successful in this persistence(send to file, Idoc, etc).
What is the issue?Hi Darin,
Check your receiver communication channel. Make sure that the protocol is set to XI 2.0 for 6.2.
Hope that helps.
Best Regards,
Doo -
Envelope missing in SOAP message header (SAP XI Extension)
I have scenario where in I am sending a file from XI to PCK. BUt i am getting a following error.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
<SAP:P1>Envelope</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>XML tag Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I am enclosing the file i am trying to send.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:CFP_SENDER_MT xmlns:ns0="HTTP://PCKXI.WORLDBANK.ORG">
- <SEND>
<TF_Number>12</TF_Number>
<TF_Desc>1212</TF_Desc>
</SEND>
</ns0:CFP_SENDER_MT>
Can somebody please enlighten me about this error? Points would be rewarded immediately
Regards,
ManishDear Manish,
quite often the reason for this kind of error
is the fact that the receiver of the XI message is
returning a http response to the Integration Server.
As of XI3.0 SP21 / PI7.0 SP13 this response
is also properly parsed and visible in the error
header of the XI message.
For almost all prior support package levels an
advanced correction is available as per OSS note:
1064346 Improved error output for connection problems
Please check whether this applies to your system.
If so, you will see detailed information on the error
in the error header object of the XI message as soon
as this issue re-occurs.
Best Regards,
Harald Keimer
XI Development Support
SAP AG, Walldorf -
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! -
WLS 7.0 sp2 - Servlet Problems with SOAP messages
I'm using Weblogic 7.0 SP2 and trying to create a Servlet to receive SOAP wrapped
XML messages. I'm getting the following error. Is this a problem with WLS7.0sp2's
support of JAXM? The System.out.println's indicate I have successfully received
the incoming SOAP request and then successfully formatted the SOAP response, but
upon returning saving the response it appears to blow up. Does anyone have any
suggestions?
I need to do the following in a servlet:
- receive an incoming SOAP request with an embedded XML message
- perform some processing
- return a SOAP response with an embedded XML message
Should I be using JAXM? Or can I do this same task easily with JAX-RPC?
<Feb 24, 2004 4:10:42 PM AST> <Error> <HTTP> <101017> <[ServletContext(id=260434
7,name=isd.war,context-path=)] Root cause of ServletException
java.lang.Error: NYI
at weblogic.webservice.core.soap.SOAPMessageImpl.saveRequired(SOAPMessag
eImpl.java:360)
at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5445)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:780)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3105)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
>
I've stripped the code down so that all it does is verifies the incoming SOAP/XML
request and creates a hard-coded response... be gentle... I'm a novice at this
import javax.xml.soap.*;
import javax.servlet.*;
import javax.servlet.http.*;
// import javax.xml.transform.*;
import java.util.*;
import java.io.*;
public class RegisterServlet extends HttpServlet
static MessageFactory fac = null;
static
try
fac = MessageFactory.newInstance();
catch (Exception ex)
ex.printStackTrace();
public void init(ServletConfig servletConfig) throws ServletException
super.init(servletConfig);
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
IOException
try
System.out.println("** Note: doPost() Entering req = " + req);
// Get all the headers from the HTTP request
MimeHeaders headers = getHeaders(req);
// Get the body of the HTTP request
InputStream is = req.getInputStream();
// Now internalize the contents of a HTTP request
// and create a SOAPMessage
SOAPMessage msg = fac.createMessage(headers, is);
System.out.println("** Note: doPost() Step A");
SOAPMessage reply = null;
reply = onMessage(msg);
System.out.println("** Note: doPost() Step B reply = " + reply);
if (reply != null)
* Need to call saveChanges because we're
* going to use the MimeHeaders to set HTTP
* response information. These MimeHeaders
* are generated as part of the save.
if (reply.saveRequired())
System.out.println("** Note: doPost() Step C reply.saveRequired()");
reply.saveChanges();
resp.setStatus(HttpServletResponse.SC_OK);
putHeaders(reply.getMimeHeaders(), resp);
// Write out the message on the response stream
OutputStream os = resp.getOutputStream();
System.out.println("** Note: doPost() Step D os = " + os);
reply.writeTo(os);
os.flush();
else
resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
catch (Exception ex)
throw new ServletException("** Error: SAAJ POST failed: " + ex.getMessage());
static MimeHeaders getHeaders(HttpServletRequest req)
Enumeration enum = req.getHeaderNames();
MimeHeaders headers = new MimeHeaders();
while (enum.hasMoreElements())
String headerName = (String)enum.nextElement();
String headerValue = req.getHeader(headerName);
StringTokenizer values =
new StringTokenizer(headerValue, ",");
while (values.hasMoreTokens())
headers.addHeader(headerName,
values.nextToken().trim());
return headers;
static void putHeaders(MimeHeaders headers, HttpServletResponse res)
Iterator it = headers.getAllHeaders();
while (it.hasNext())
MimeHeader header = (MimeHeader)it.next();
String[] values = headers.getHeader(header.getName());
if (values.length == 1)
res.setHeader(header.getName(),
header.getValue());
else
StringBuffer concat = new StringBuffer();
int i = 0;
while (i < values.length)
if (i != 0)
concat.append(',');
concat.append(values[i++]);
res.setHeader(header.getName(), concat.toString());
// This is the application code for handling the message.
public SOAPMessage onMessage(SOAPMessage message)
SOAPMessage replymsg = null;
try
System.out.println("** Note: OnMessage() Entering msg = " + message);
//Extract the ComputerPart element from request message and add to reply SOAP
message.
SOAPEnvelope reqse = message.getSOAPPart().getEnvelope();
SOAPBody reqsb = reqse.getBody();
//System.out.println("** Note: OnMessage() Step B");
System.out.println("** Note: OnMessage () Step A Soap Request Message Body = "
+ reqsb);
//Create a reply mesage from the msgFactory of JAXMServlet
System.out.println("** Note: OnMessage () Step B");
replymsg = fac.createMessage();
SOAPPart sp = replymsg.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPBody sb = se.getBody();
System.out.println("** Note: OnMessage () Step C Soap Reply Before Message Body
= " + sb);
se.getBody().addBodyElement(se.createName("RegisterResponse")).addChildElement(se.createName("ErrorCode")).addTextNode("000");
System.out.println("** Note: OnMessage () Step D Soap Reply After Message Body
= " + sb);
replymsg.saveChanges();
System.out.println("** Note: OnMessage() Exiting replymsg = " + (replymsg));
catch (Exception ex)
ex.printStackTrace();
return replymsg;
Michael,
I got the same error on WLS8.1/Win2K professional and apache FOP (old version).
After digging into the WLS code and FOP(old version). i found the conflict happens
on
the "org.xml.sax.parser" system property. In WLS code, they hard coded like the
following when startup weblogic server:
System.setProperty("org.xml.sax.parser", "weblogic.xml.jaxp.RegistryParser");
But the FOP code try to use the "org.xml.sax.parser" system property to find the
sax parser then conlict happens.
Here is the response from BEA support :
"I consulted with our developers regarding the question of whether we can change
the hard-coded value for the java system property: org.xml.sax.parser by using
a configuration parameter and I found that unfortunately there is no specific
setting to change the value. As you had mentioned in your note the org.xml.sax.parser
system property can be changed programmatically in your application code."
I solve my problem by using newer apache FOP (it never use the system property:org.xml.sax.parser
any more) and XML Registy for WLS8.1.
Good luck.
David Liu
Point2 Technologies Inc.
"p_michael" <[email protected]> wrote:
>
Help.
When we migrated from WLS 6.1 to WLS 7.0 SP2 when encountered a problem
with XML
parsing that did not previously exist.
We get the error "weblogic.xml.jaxp.RegistryParser is not a SAX driver".
What does this mean? And, what should we do about it.
p_michael
Maybe you are looking for
-
Home Hub 3-- Re-activating BTWIFI and BTFON signal...
I have a Home Hub 3 and some days ago I had to do a factory reset on it. After that I had lost the BTWIFI and BTWIFI-with FON hotspot signals from the hub. When I logged in to the hub it said “You aren't currently part of the BT FON WiFi Community”.
-
I really can't wait for my new iPhone 5. I am worried because I need it to take picsures of a project I am making in school. I have to take pictures of almost every step in the process. I am starting next week and I will be carrying it out over the n
-
DVD ripping/compressing speeds with G5 vs. G4
Hello, My new G5 iMac (2.1mhz, 512mb ram) doesn't rip/compress video nearly as fast as my old G4 Powermac (dual 1.25mhz, 1.75GB ram). It took 36 minutes for the G5 but only 21 minutes for the G4 (to rip). Is it because I only have 512mb ram on the G5
-
Re: (forte-users) Partial live upgrade
Hi, It should be possible using the Compatibility Level for instance. Then, you will be able to install the CL1 having the CL0 still running. You could test the CL1 in an IVP to verify that the installation is correct and then, uninstall the CL0. May
-
MY Ipad Mini Touchscreen Is Not Responding. It Won't Let Me Type In My Password When I Tried It Then Said That It Was Disabled For 1 Minute. Then I Tried It Again It Said Disabled For 5 Minutes. then I Tried To Reset It, I've Tried Recovery Mode NOTH