Escaping characters in SOAP Envelope XML string
Hello,
I have a manual web service reference (i.e. a XML String parametrized with more fields from my apex page). Sometimes the web service call fails because the user can enter special XML characters in the text field (this in consequence makes the XML String invalid XML). Do you know any elegant way to deal with this problem? Having a process that does htf.escape_sc for each text field in the same page I have my text field is a bit complcated in my case.
Are there any other options?
Many thanks in advance
Hi "user11085282",
you might try to wrap the user input in CDATA sections ... this is the "XML way" to have special characters in a document without escaping them. CDATA sections look
as follows
<tag><![CDATA[& & < <> >]]></tag>
http://www.w3schools.com/xml/xml_cdata.asp
Hope this helps ...
Carsten Czarski
Deutschsprachige APEX-Community: Tipps, Tricks, Best Practice
http://tinyurl.com/apexcommunity
SQL und PL/SQL: Tipps, Tricks & Best Practice
http://sql-plsql-de.blogspot.com
Twitter: @cczarski @oraclebudb
Similar Messages
-
SOAP envelope XML body extraction
hello , I'm new in the 'XML-world' and also new on this forum but i have a question.
My function :
create or replace
FUNCTION DHL_SOAP_RESPONSE_XMLTYPE RETURN XMLType AS
SOAP_RESPONSE constant varchar2(32767) :=
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<rateresp:RateResponse xmlns:rateresp="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/RateMsgResponse">
<Provider code="DHL">
<Notification code="0">
<Message/>
</Notification>
<Service type="C">
<TotalNet>
<Currency>EUR</Currency>
<Amount>17.28</Amount>
</TotalNet>
<Charges>
<Currency>EUR</Currency>
<Charge>
<ChargeType>MEDICAL EXPRESS</ChargeType>
<ChargeAmount>14.77</ChargeAmount>
</Charge>
<Charge>
<ChargeType>FUEL SURCHARGE</ChargeType>
<ChargeAmount>2.51</ChargeAmount>
</Charge>
</Charges>
<DeliveryTime>2013-02-06T12:00:00</DeliveryTime>
<CutoffTime>2013-02-05T20:30:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>
<Service type="T">
<TotalNet>
<Currency>EUR</Currency>
<Amount>17.28</Amount>
</TotalNet>
<Charges>
<Currency>EUR</Currency>
<Charge>
<ChargeType>EXPRESS 12:00</ChargeType>
<ChargeAmount>14.77</ChargeAmount>
</Charge>
<Charge>
<ChargeType>FUEL SURCHARGE</ChargeType>
<ChargeAmount>2.51</ChargeAmount>
</Charge>
</Charges>
<DeliveryTime>2013-02-06T12:00:00</DeliveryTime>
<CutoffTime>2013-02-05T20:30:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>
<Service type="G">
<TotalNet>
<Currency/>
<Amount>0.00</Amount>
</TotalNet>
<DeliveryTime>2013-02-06T23:59:00</DeliveryTime>
<CutoffTime>2013-02-05T20:30:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>
<Service type="N">
<TotalNet>
<Currency>EUR</Currency>
<Amount>13.69</Amount>
</TotalNet>
<Charges>
<Currency>EUR</Currency>
<Charge>
<ChargeType>DOMESTIC EXPRESS</ChargeType>
<ChargeAmount>11.70</ChargeAmount>
</Charge>
<Charge>
<ChargeType>FUEL SURCHARGE</ChargeType>
<ChargeAmount>1.99</ChargeAmount>
</Charge>
</Charges>
<DeliveryTime>2013-02-06T23:59:00</DeliveryTime>
<CutoffTime>2013-02-05T20:30:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>
<Service type="9">
<TotalNet>
<Currency/>
<Amount>0.00</Amount>
</TotalNet>
<DeliveryTime>2013-02-07T23:59:00</DeliveryTime>
<CutoffTime>2013-02-05T16:30:00</CutoffTime>
<NextBusinessDayInd>N</NextBusinessDayInd>
</Service>
</Provider>
</rateresp:RateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
BEGIN
RETURN XMLType(SOAP_RESPONSE);
END;
Now what I want is extract the body of the respons with a select .
Can someone help me because I don't understand this ?
I work with the Oracle Database XE 11g.
SQL developer.
Thanks alreadyWelcome to the forums.
As a tip for future posts [url https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360002]2. How do I ask a question on the forums?
That said, a basic example that pulls the contents of the body out is
declare
l_ws_rsp XMLTYPE;
l_body_rsp XMLTYPE;
begin
-- Retrieving the SOAP message
l_ws_rsp := DHL_SOAP_RESPONSE_XMLTYPE;
-- Extracting out the body
SELECT xt.body_xml
INTO l_body_rsp
FROM XMLTable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV"),
'/SOAP-ENV:Envelope/SOAP-ENV:Body/*'
PASSING l_ws_rsp
COLUMNS
body_xml XMLTYPE PATH '.') xt;
dbms_output.put_line(l_body_rsp.getClobVal());
end;If you Google
XMLTable soap site:forums.oracle.com
you can find plenty of examples on these forums regarding how to parse a web service response.
The bigger question is, what are you going to do with the data in the response. As the example above alludes too, you can actually parse the entire WS response with one SQL statement and return the results as one or more rows. Will you be performing PL/SQL logic on the returned results or will you simply be INSERTing them into the database for something else to use? -
Stop escaped characters from resolving within String class.
Hello,
Is it possible to stop escaped characters from resolving within the String class?
For example, I define a character array,
char[] c = {'0','\\','n'}
and I want to create a String based on this exact sequence (0\n). However, when I call the String constructor String(char[]), it resolves the \n sequence into the newline character, creating a String of length 2 not 3.
I'm not very familiar with the innards of the Java compiler (does "xyz" translate to char[]{'x','y','z'}?), so maybe this is something very basic.
Does anyone know if there is a flag that can be set somehow before I create a String instance (it appears that no String constructor supports this kind flag)?
Or perhaps is there a method in the standard Java release that escapes all escape characters in a character array...? I'm curious if there is a simpler way (like a flag), because the method approach seems superfluous.
Thanks,
BrienWhat do you mean?char[] c = {'0', '\\', 'n'};
String s = new String(c);
System.out.println(s);does give the string 0\n...
And by the way, it's not the String class that transforms \n to the linefeed character, it is the compiler.. -
XML escaping issue in ABAP during XML file transfer to App. Server.
Hello Partners:
I was going through some work of XML integration of SAP with a third-party. But came across an issue:
The text descriptions we are sending within an XML tag has certain special characters like '&'. But the XML parser is not escaping it. Hence its replacing '&' with "&" in the XML data string. So now I need to understand how can we implement escaping via ABAP for generated XML strings? Can you all please help me to understand which methods to use and how?
It will be much appreciated.
Thanks in advance.
Vivek Singh.Hello SAP Friends!
I'm facing the same problem concerning special chars in XML. I've tried to unescape the '&' sign with methods of if_ixml_ostream
l_ostream->set_ignore_escaping( ignore_escaping = '&' ).
the character is set and can be called by
l_str = l_ostream->get_ignore_escaping( ).
After the rendering was done and the download has finished the xml document can be loaded in EXCEL but the special characters are replaced by & a m p;
Has anybody found a method to avoid the behaviour?
My original problem is, the the data have to be in one cell in excel. I know at present no method to download data (text including line feeds) from SAP to excel into one cell.
Maybe you have found a way to use ignore_escaping in correct way!
Thanks a lot in advance!!! -
How to get an xml string into a Document w/o escaping mark-up characters?
Hi,
I am using one of the latest xerces using Java. I am pretty sure I am using xerces-2.
I have an existing Document and I am trying to add more content to it. The new content itself is xml string. I am trying to insert this xml string into the document using document.createTextNode. I am able to insert, but somewhere it is escaping the mark-up characters (<,>,etc). When I convert the document into String, I can see, for example, <userData> instead of <userData>.
There is an alternative option to accomplish this by creating a new document with this xml string, get the root element, import this element into my document. Execution time for this procedure is very high - means, this is very bad in terms of time-wise performance.
Can any help on how to accomplish this (bringing an xml string into a document without escaping mark-up characters) in time-efficient way.So you want to treat the contents of the string as XML rather than as text? Then you have to parse it.
Or if your reason for asking is just that you don't like the look of escaped text, then use a CDATA section to contain the text. -
JAXB 1.3 can't parse W3 SOAP 2003-05 envelope XML schema
Hello,
I was trying to use JAXB to parse the MMAP schema from the SMS Forum
(http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd). I finally
tracked it down to XJC choking on the included SOAP envelope schema's
use of the xml:lang attribute for a tag called reasontext. Here's the
pared-down test case:
C:\java\src\baz>%JWSDP_HOME%\jaxb\bin\xjc.bat http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
%JWSDP_HOME%\jaxb\bin\xjc.bat http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
parsing a schema...
[ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.
line 97 of soap-envelope.xsd
[ERROR] src-ct.0.1: Complex Type Definition Representation Error for type 'reasontext'. Element 'attribute' is invalid, misplaced, or occurs too often.
line 97 of soap-envelope.xsd
Failed to parse a schema.
C:\java\src\baz>I believe that the relevant portions of the schemas and namespaces in
question are:
http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
<xs:complexType name="reasontext">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="xml:lang" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>http://www.w3.org/2001/XMLSchema.xsd
<xs:complexType name="attribute" mixed="false">
<xs:complexContent>
<xs:extension base="xs:annotated">
<xs:sequence>
<xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType" />
</xs:sequence>
<xs:attributeGroup ref="xs:defRef" />
<xs:attribute name="type" type="xs:QName" />
<xs:attribute name="use" use="optional" default="optional">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="prohibited" />
<xs:enumeration value="optional" />
<xs:enumeration value="required" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="default" type="xs:string" />
<xs:attribute name="fixed" type="xs:string" />
<xs:attribute name="form" type="xs:formChoice" />
</xs:extension>
</xs:complexContent>
</xs:complexType>http://www.w3.org/2001/XMLSchema.xsd
<xs:attributeGroup name="defRef">
<xs:annotation>
<xs:documentation>for element, group and attributeGroup, which both define and reference</xs:documentation>
</xs:annotation>
<xs:attribute name="name" type="xs:NCName" />
<xs:attribute name="ref" type="xs:QName" />
</xs:attributeGroup>http://www.w3.org/XML/1998/namespace
The namespace whose name is http://www.w3.org/XML/1998/namespace is
bound by definition to the prefix xml: according to Namespaces in XML,
W3C Recommendation 14 Jan 1999. Note that unlike all other XML
namespaces, both the name and the prefix are specified; i.e., if you
want XML 1.0 processors to recognize this namespace, you must use the
reserved prefix xml:.
xml:lang and xml:space
As of the last update of this document, the XML 1.0 Specification
defines two attribute names in this namespace:
xml:lang
Designed for identifying the human language used in the scope of the
element to which it's attached.
.I'm no XML schema expert, but it looks to me like "name" and "ref"
are both valid attributes for an <xs:attribute> tag and that the XML
namespace standard requires XML processors to recognize the xml:lang
attribute. Hence, this appears to me to be a bug in JAXB.
A secondary bug is that the original error message left the name of
the offending included schema blank:
C:\java\src\foo>d:\java\jwsdp\jwsdp-1.3\jaxb\bin\xjc.bat http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd
parsing a schema...
[ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.
line 97 of
[ERROR] src-ct.0.1: Complex Type Definition Representation Error for type 'reasontext'. Element 'attribute' is invalid, misplaced, or occurs too often.
line 97 of
Failed to parse a schema.
C:\java\src\foo>In case it helps with problem diagnosis, I'm running with J2SDK 1.4.2
and have copied the endorsed jar files into the JRE lib as instructured
with JAXB:
C:\java\src\baz>java -version
java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
C:\java\src\baz>dir %JAVA_HOME%\jre\lib\endorsed
dir %JAVA_HOME%\jre\lib\endorsed
Volume in drive D has no label.
Volume Serial Number is 70AE-6E52
Directory of D:\java\j2se\j2sdk1.4.2\jre\lib\endorsed
03/31/2004 09:41 AM <DIR> .
03/31/2004 09:41 AM <DIR> ..
03/29/2004 01:28 PM 56,619 dom.jar
03/29/2004 01:28 PM 60,963 sax.jar
03/29/2004 01:28 PM 2,823,241 xalan.jar
03/29/2004 01:28 PM 2,667,618 xercesImpl.jar
10/10/2003 06:36 PM 1,379,810 xsltc.jar
6 File(s) 6,989,573 bytes
2 Dir(s) 7,889,731,584 bytes free
C:\java\src\baz>I'm quite interested in the resolution of this issue as I'm stopped in
my tracks on progress here. Help with resolution, whether in JAXB or
my usage of it, will be much appreciated. I did a search of existing
issues but didn't notice a duplicate. Thanks in advance.I have also come across a similar problem with validating an xml file with an xml:lang attribute. It seems to be common across the schema validation and dtd validation. I get the following error with both schema and dtd validation:
Validation Error Msg (0): unexpected attribute "xml:lang"
Validation Error Location (0): FreeFormText
The test file extract looks like this:
<FreeFormText xml:lang="EN">Pelle</FreeFormText>
The schema defines the node as:
<xs:complexType name="FreeFormText">
<xs:simpleContent>
<xs:extension base="FreeFormTextType">
<xs:attribute name="lang" type="xs:language"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
and the dtd defines the node as:
<!ELEMENT FreeFormText
(#PCDATA)>
<!ATTLIST FreeFormText xml:lang CDATA #IMPLIED >
This looks like a bug in JAXB to me aswell. Any help on it would be much appreciated as i am also stuck. -
SOAP Adapter without SOAP envelope sets contenttype to application/xml
Hi,
I wrote a adaptermodul for the SOAP adapter to create a SOAP:HEADER.
I disable the SOAP envelope in the communication channel.
Now I get a error from the WebService Provider because the SOAP Adapter sends with Content-Type application/xml and not text/xml. I set the content-type in the adapter module but it seens to not work.
How can I correct this ?
Regards,
GeraldHi
Simple answer is NO, it is not possible (without party/channel/ service etc to process the request)
but it is worth a try to check if the URL encoding works.. though I have not tried..
for example sending the hex value of the "?" - %3F%
URL is a generic topic, you can search that to get more information
(ex : http://www.blooberry.com/indexdot/html/topics/urlencoding.htm)
Regards
Vishnu -
Trying To Insert XML String Greater Than 4000 Characters in PHP Fails
Dear Sir,
Subject:-Trying To Insert XML String Greater Than 4000 Characters in PHP Fails ORA-01704.
In an attempt to design web app in PHP and inserting data into "CLOB" field of "articles" table associated with it, returning ORA-01704: string literal too long error.
Platform: OEL5
Database 11g(11.0.7.0)
php : 5.2
I refer to oracle document ID: [ID 336888.1] it is asking to contact support.
Please help us in this regards.
Many Thanks,
mkyazdaniHi,
I appreciate you, yes it is similar i have referred that manual and also inform to our php developer about the changes we need to make in our php script.
Regards,
mkyazdani -
Xml string in Java - forbidden characters for data?
Hi there,
In my java class I am building a xml string and saving it as a xml file in the hard drive. Later when I open the file in the XML editor it gets errors "forbidden characters". I think the problem is that in the data there can be characters as & or <> and of course that would disturbe the xml structure. Is there any smart method in Java which convert all the forbidden characters for xml data?... many thanks for any hints.emailkia wrote:
In my java class I am building a xml string and saving it as a xml file in the hard drive. I am guessing that you are building a string into which you are putting what you think is xml.
And it isn't.
So the real solution is to build it correctly in the first place.
Is there any smart method in Java which convert all the forbidden characters for xml data?There are also libraries that will allow you to build xml which handle those sorts of issues for you. -
how to escape <,> in xml string to < ,
>.is it possible to convert the entire xml string into this
format
ex:
<root> <sample><id> 89
</id></sample></root>
this has to be converted into
< root>. < sample>. <
id>. 89 < /id>. < /sample>.
< /root>.myString="<root> <sample><id> 89
</id></sample></root>";
myString.split("<").join("<"); -
Hi all,
Can any body please suggest me the steps to capture the SOAP envelope using XML SPY?
Also while sending a SOAP request through XML Spy to server, i get an empty response. I tried to monitor the packets passing through the network card with the destination specified in the SOAP request, there was such message. Can any body please suggest me the possible reasons and the solution for the same?
Thanks and best regards,
Kulwant
Thanks and best regards,
Kulwant SinghHi
If you are getting the response back as blank response so check the request you are sending to the web serviceor RFC have any response information or it is blank.
or
if u have use the exactly once option in the adapter then u will get the blank response while sending the request using the xml spy.
Thanks
Rinku -
Hi there,
Well, it is mysterious - not to say frightning !
When I first start my tomcat I get an Exception like:; Could not load com.sun.xml.messaging.saaj.soap.Envelope
The second time it runs well. No Exception about classloading. And the app is nice.
Hmm, why ? Can�t find out.
I think that Exception has to have some relation to jars and where they are placed.
According to the JAXWS-page I placed:
jaxb-api.jar, jaxws-api.jar, jsr173_api.jar, saaj-api.jar
in my %JRE_HOME%\lib\endorsed\
so far so good !
The rest of the needed jars to run JAX-WS Webservices are in my WEB-INF/lib FOLDER
activation.jar and so on
Any Ideas ?
Here is the Exception I get when I invoke the Service
INFO: Illegal access: this web application instance has been stopped already. Could not load com.sun.xml.messaging.saaj.soap.Envelope. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:78)
at com.sun.xml.ws.message.AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:177)
at com.sun.xml.ws.client.dispatch.SOAPMessageDispatch.toReturnValue(SOAPMessageDispatch.java:93)
at com.sun.xml.ws.client.dispatch.SOAPMessageDispatch.toReturnValue(SOAPMessageDispatch.java:57)
at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:188)
at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:192)
at idff.server.service.ArtifactResolver.resolve(ArtifactResolver.java:101)
at servlets.AssertionConsumerServlet.doPost(AssertionConsumerServlet.java:149)
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:368)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
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:619)
09.08.2007 14:40:12 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet AssertionConsumerServlet threw exception
java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/Envelope
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:78)
at com.sun.xml.ws.message.AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:177)
at com.sun.xml.ws.client.dispatch.SOAPMessageDispatch.toReturnValue(SOAPMessageDispatch.java:93)
at com.sun.xml.ws.client.dispatch.SOAPMessageDispatch.toReturnValue(SOAPMessageDispatch.java:57)
at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:188)
at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:192)
at idff.server.service.ArtifactResolver.resolve(ArtifactResolver.java:101)
at servlets.AssertionConsumerServlet.doPost(AssertionConsumerServlet.java:149)
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:368)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
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:619)
Listening for transport dt_shmem at address: bundled_tomcat
Anybody help, please !First, thanks for your reply jitu.
I don�t get this exception anymore.
Well, your hint was quite right, so I think I may give you the duke stars.
I found out that putting the jars into the shared/lib don�t work. Maybe it is because I am running 3 tomcat instances at the same time.
I put all the Jax-ws libs into the tomcat_home/common/lib directory.
And left the endorsed libs in the java endoresed directory.
putting the endorsed libs in the tomcat_home/common/lib/endorsed may also work.
regards and thanks,
footman -
Escape XML Strings with JDK class
Hi,
can anyone tell me how to escape XML-Strings with classes of the JDK?
When searching I only was pointed to StringEscapeUtils from apache.commons.lang, but we would prefer to use the JDK instead of integrating an external lib.
Our aim is to escape an XML attribute, so a CDATA is not applicable for us in this case.
Thanks
JanI implemented it by myself:
public static String escapeXmlAttribute(String attributeValue) {
StringBuffer result = new StringBuffer();
for (int c = 0; c < attributeValue.length(); ++c) {
if (attributeValue.charAt(c) == '"') {
result.append(""");
} else if (attributeValue.charAt(c) == '&') {
result.append("&");
} else if (attributeValue.charAt(c) == '<') {
result.append("<");
} else if (attributeValue.charAt(c) == '>') {
result.append(">");
} else {
result.append(attributeValue.charAt(c));
return result.toString();
}{code} -
Enclosing Transformed XML in SOAP envelope
All,
I am currently facing difficulty to send a XML document via HTTP Post enclosed in a SOAP envelope.
1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.
2. Transform the message
3. Now I want to enclose the transformed message into a SOAP envelope and send it via HTTP Post to a third party system.
I am facing difficulty in Step 3. Could some one suggest me how to enclose the XML messages inside a SOAP envelope and some pointers to use HTTP Adapter?
Thanks in advanceI just found out that HTTP binding activity does not support XMLs with complex types.(Note ID: 1328955.1) Now I guess the only choice for me is to use Java or any other programming language to do the HTTP post.
This is what i am thinking.
1. Create a XML file with the required format using SOA
2. Use a Java program to pick the file from a location and send it to the target URL( enclosing it in a SOAP envelope)
3. Get the response and update oracle status tables.
The trouble i will face here is to pass the file name , target URL as the parameters.
Is there a way to create this program and orchestrate using BPEL? Meaning- call this java program after i finish generating the file and pass the file name and the target URL as parameter?
Please suggest if a better approach could be followed for this.
Thanks,
Dwarak -
How to replace escape characters in a string ?
Hi All,
In my application I came across a problem where I want to replace a substring (contains escape characters also) with another string. The below shown code will replicate my problem :
public class StringSearchAndReplace {
public static void main(String args[]) {
String stmt = " \\pntext\\bullet\\tab The question as to ";
String newStmt = stmt.replaceAll("\\bullet\\tab", "B");
System.out.println("BEFORE: " + stmt + "\n");
System.out.println("AFTER: " + newStmt);
}Here I want to replace "\\bullet\\tab" with "B". I am unable to move further. Please help/suggest me in this regard.
Its urgent.
Thanks in advance.Satyaprasad_Mylavarapu wrote:
Hi All,
In my application I came across a problem where I want to replace a substring (contains escape characters also) with another string. The below shown code will replicate my problem :
public class StringSearchAndReplace {
public static void main(String args[]) {
String stmt = " \\pntext\\bullet\\tab The question as to ";
String newStmt = stmt.replaceAll("\\bullet\\tab", "B");
System.out.println("BEFORE: " + stmt + "\n");
System.out.println("AFTER: " + newStmt);
}Here I want to replace "\\bullet\\tab" with "B". I am unable to move further. Please help/suggest me in this regard.
Its urgent.
Thanks in advance.If the String you're trying to replace contains a slash you need four slashes (double it for java, then again because String.replaceAll takes a regular expression)
So I think what you're looking for is:
String newStmt = stmt.replaceAll("\\\\bullet\\\\tab", "B");I haven't tested that though.
Maybe you are looking for
-
Mail icon bounces, but never launches. HELP!
Dear People Who Know Macs Better Than Me, Please help! Yesterday I was trying to back up my Mail (Home/Library/Mail), and when I saw that it was as big as it was, I tried compressing/archiving the Mail folder using the (Create archive of "Mail") when
-
Problem with Webservice after upgrading to cf8
I have a webservice created in ColdFusion 6.1 that worked just fine when being called from MS Access. I upgraded coldfusion to v8, and now the webservice isn't working. Nothing else was changed. The strange thing is I can call the webservice from a f
-
CC&B v2.3.1 Integration Configuration Issue
Hello all. We're working on implementing the configuration for CC&B v2.3.1 for integration with AIA. However, we have been unable to successfully place any message to the AIA JMS queue. Our CC&B and AIA resides in 2 different servers. We're using Web
-
1 Email shows all tasks assigned to team member
Hi, Project Server 2013, (not using timesheets) Can any ways I can accumulate all the 10 tasks assigned to user xyz, and send him 1 email containing all tasks info to the users. 2nd- Can I send a email to every users- with their Pending tasks of last
-
J'ai synchronisé mon Iphone sur Itunes mais j'ai perdu toutes mes achats serait-il possible de les récupéré ?