SOAP response enclosed in XD tags
Hello,
I use this function to make a SOAP request to my server:
function Execute-SOAPRequest
[Xml] $SOAPRequest,
[String] $URL
write-host "Sending SOAP Request To Server: $URL"
$soapWebRequest = [System.Net.WebRequest]::Create($URL)
$soapWebRequest.Headers.Add("SOAPAction","`"`"")
$soapWebRequest.ContentType = "text/xml;charset=`"utf-8`""
$soapWebRequest.Accept = "text/xml"
$soapWebRequest.Method = "POST"
write-host "Initiating Send."
$requestStream = $soapWebRequest.GetRequestStream()
$SOAPRequest.Save($requestStream)
$requestStream.Close()
write-host "Send Complete, Waiting For Response."
$resp = $soapWebRequest.GetResponse()
$responseStream = $resp.GetResponseStream()
$soapReader = [System.IO.StreamReader]($responseStream)
$ReturnXml = [Xml] $soapReader.ReadToEnd()
$responseStream.Close()
write-host "Response Received."
return $ReturnXml
The soap response is well recived but with the command "$ret | Export-Clixml c:\1.xml;Get-Content c:\1.xml",
the XML file contains:
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
<XD> ... </XD>
</Objs>
Between XD tags I have my xml reponse received from the server except that "<" and ">" are converted
to the html code, "<" and ">".
I'm using select-string cmdlet with -patern option to check the response, but it would be more convenient to use the xml
way like $ret.SelectNodes()
I tried doing a replace on the response before doing the export-clixml, but it doesnt work, how can I do this ?
Thank you :)
Nice bunch ofgueses but, if you look up the type and see that it has a "save", then you will be able to do this:
Here I show how t use static strings to avoind issues with quotes in HTML and XML strings. In bothe we can use either single or double quotes on attributes.
function Execute-SOAPRequest{
Param(
[xml]$SOAPRequest,
[string] $URL
write-host "Sending SOAP Request To Server: $URL"
$soapWebRequest = [System.Net.WebRequest]::Create($URL)
$soapWebRequest.Headers.Add('SOAPAction','""')
$soapWebRequest.ContentType = 'text/xml;charset="utf-8"'
$soapWebRequest.Accept = 'text/xml'
$soapWebRequest.Method = 'POST'
write-host 'Initiating Send.'
$requestStream = $soapWebRequest.GetRequestStream()
$SOAPRequest.Save($requestStream)
$requestStream.Close()
write-host 'Send Complete, Waiting For Response.'
$resp = $soapWebRequest.GetResponse()
$responseStream = $resp.GetResponseStream()
$soapReader = [System.IO.StreamReader]($responseStream)
$ReturnXml = [Xml]$soapReader.ReadToEnd()
$responseStream.Close()
write-host 'Response Received.'
$ReturnXml
# to save
$xml=Execute-SOAPRequest $request $uri
$xml.Save('c:\mysoap.xml')
Export-CliXml is used to persist PS objects. It does not ssabe XML objects as an XML file.
Use [xml] to reload tehfile
You should use New-WebServiceProxy as it does all of this for you.
$URI = "http://www.webservicex.net/uszip.asmx?WSDL"
$zip = New-WebServiceProxy -Uri $URI
$xmlResponse=$zip.GetInfoByAreaCode(212)
$xmlResponse.Table | ft -auto
$xml=[xml]('<ac212>'+$xmlResponse.InnerXml.ToString()+'</ac212>')
$xml.Save('c:\AC212.xml')
¯\_(ツ)_/¯
Similar Messages
-
Hi,
I have created the sample "Stateless Java Web Service Tutorial" HelloImpl.java
My SOAP response contains the follwoing tag
<ns1:sayHelloReponse xmlns="..." SOAP-ENV="...">
<return xsi:type="string">Hello Test! The ... </return>
</ns1:sayHelloResponse>
I want the soap message not to print the return tag as string but my custom tag which is an xml file, i want my class to return an xml formatted string and the xml will be my reponse
please advicewell..the problem is..the db adapter has it's own transaction..so the transactions fails or not.
you're just not capable of checking if the transaction went ok...and return 'process completed ok' or when the transaction failed for some reason return 'the process aborted'.
So you just need some extra steps for it to be able to return some response-message -
Presence of multiref tag in soap response message
We are having a problem when we try to call a web service in PI. The web services called is provided by an Axis server.
We tried to use the plain HTTP protocol in the definition of the communication channel as shown here:
Adapter type: SOAP
Transport protocol: HTTP
Message protocol: SOAP 1.1
Adapter engine: Central Adapter Engine
We got the followong error response in SXMB_MONI:
The payload shown in SXNB_MONI is:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- XML Validation Inbound Channel Response -->
<ns1:cedstr_obt_cle_elem_v2_Response xmlns:ns1='urn:CEDSTR' soapenv:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' 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'>
<tab_cle soapenc:arrayType='ns1:cedstr_cle_elem_v1[3]' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xsi:type='soapenc:Array'>
<item href='#id0'/>
<item href='#id1'/>
<item href='#id2'/>
</tab_cle><nb_cle xsi:type='xsd:int'>3</nb_cle><stat_elem href='#id3'/>
<cdr href='#id4'/>
</ns1:cedstr_obt_cle_elem_v2_Response>
The expected payload is:
<?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>
- <ns1:cedstr_obt_cle_elem_v2_Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:CEDSTR">
- <tab_cle xsi:type="soapenc:Array" soapenc:arrayType="ns1:cedstr_cle_elem_v1[3]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item href="#id0" />
<item href="#id1" />
<item href="#id2" />
</tab_cle>
<nb_cle xsi:type="xsd:int">3</nb_cle>
<stat_elem href="#id3" />
<cdr href="#id4" />
</ns1:cedstr_obt_cle_elem_v2_Response>
- <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:cedstr_cle_elem_v1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:CEDSTR">
<id_structure_det xsi:type="xsd:int">118406</id_structure_det>
<ordinal xsi:type="xsd:int">2648545</ordinal>
<appareil xsi:type="xsd:string">C3D1E</appareil>
<type_cable xsi:type="xsd:string">H</type_cable>
</multiRef>
- <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:cedstr_cle_elem_v1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="urn:CEDSTR">
<id_structure_det xsi:type="xsd:int">984806</id_structure_det>
<ordinal xsi:type="xsd:int">2723425</ordinal>
<appareil xsi:type="xsd:string">O5C3X</appareil>
<type_cable xsi:type="xsd:string">H</type_cable>
</multiRef>
- <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:cedstr_cle_elem_v1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4="urn:CEDSTR">
<id_structure_det xsi:type="xsd:int">1163686</id_structure_det>
<ordinal xsi:type="xsd:int">3144641</ordinal>
<appareil xsi:type="xsd:string">Y0A6B</appareil>
<type_cable xsi:type="xsd:string">H</type_cable>
</multiRef>
- <multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:cedstr_stat_elem_v1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns5="urn:CEDSTR">
<tension xsi:type="xsd:string">MT</tension>
<nb_concess xsi:type="xsd:int">0</nb_concess>
<nb_restr xsi:type="xsd:int">0</nb_restr>
<localisation xsi:type="xsd:string">DEVILLERS EST DE BEAUREGARD</localisation>
<remarque xsi:type="xsd:string" />
</multiRef>
- <multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:utlgen_cdr" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6="urn:CEDSTR">
<succes xsi:type="xsd:int">1</succes>
<code xsi:type="xsd:int">0</code>
<message xsi:type="xsd:string" />
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
</ns1:cedptr_obt_cle_di_v1_HResponse>
What I can see is that PI seems to ignore the multiref tag in the SOAP response message. Does anybody knows if there is an issue with the mutiref tag in PI ?
Thanks for your help.The SOAP adapter does not support more than one body child.
If a SOAP message with several body childs arrive, then only the first body child is considered, all other body childs are ignored.
Regards
Stefan -
Missing tag in SOAP Response object
Currently running WebLogic 8.1 SP2 (legacy system, unable to upgrade to newer versions).
Looking at a SOAP Response from a Web Service call, it's notable that there are some missing tags in the response. When the same call is made through an RMI invocation, the data is there, so it appears that it's being set correctly. The obvious answer is that it's an XML serialization problem, but there are no errors in any log files and the Codec classes for a working class and non-working class look identical.
Let me explain better
We have essentially:
Class foo {
public int getID();
public void setID(int);
Class bar1 extends foo {
//other stuff
Class bar2 extends foo {
//other stuff
The Schema defines the ID field as minOccurs="1" (the default).
The response coming from the server will look something like this:
<foo>
<bar1>
<ID>TheID</ID>
...other stuff...
</bar1>
</foo>
However, if the returned object is of the other type...
<foo>
<bar2>
...other stuff, but no ID...
</bar2>
</foo>
The classes and service are being generated from a WSDL and XSD files, searching through the value and codec classes shows no fundamental difference between the implementation of the two subclasses, yet one shows the ID, and the other doesn't.
Anyone have any idea where to look to start narrowing down the problem? This has us completely baffled.I guess I'll answer my own question since I've since been able to solve it in the hopes that it will someday help someone else.
Short answer: There is a bug in WebLogic 8.1 SP2 which generates the isPropertySet(int index) method in the Codecs incorrectly for certain subclasses.
Using the foo example from the original question
class foo;
class bar extends foo;
class dot extends foo;
If dot has additional properties, the Codec will be generated incorrectly. They should look like:
<pre>
protected boolean isPropertySet(Object my_obj, int idx) {
if (idx < SUPERPROP_COUNT) return super.isPropertySet(my_obj,idx);
idx -= SUPERPROP_COUNT;
Dot typed_obj = (Dot) my_obj;
switch(idx) {
case 0:
return typed_obj._isSetAdditionalProperty();
</pre>
...etc
What it actually does look like is...
<pre>
protected boolean isPropertySet(Object my_obj, int idx) {
Dot typed_obj = (Dot) my_obj;
switch(idx) {
case 0:
return typed_obj._isSetAdditionalProperty();
</pre>
...etc
so attempting to get the eariler properties of the super class from an instance of the sub class returns erratic results depending on whether properties of the subclass were set.
Anyway, this was fixed in SP3 or 4, and there was a patch available to fix it in SP2 as well. Good luck if anyone else happens to run into this problem. -
Xsl/stylesheet transformation problem in soap response(usinf xmlx-tags.tld)
Hi,
I have problem in transforming the soap response using xmlx-tags.tld.....
I was not able to read the <EmpName> value from the returned xml...
The stylesheet / xsl does not return any elements if I use other then "/" in match
attribute : <xsl:template match="/">
here is my soap call and stylesheet in JSP:
<x:xslt media="html">
<x:xml>
<ws:soap ttl="360000">
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
... making soap call here...
</soap:Body>
</soap:Envelope>
</ws:soap>
</x:xml>
<x:stylesheet media="html">
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xmll" omit-xml-declaration="no"
doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" indent="yes" />
<xsl:template match="GetEmpResult">
<html>
<body>
Result: <B>Symbol <xsl:value-of select="EmpName"/></B>
</body
</html>
</xsl:stylesheet>
</x:stylesheet>
</x:xslt>
the SOAP response looks like this:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetEmpResponse xmlns="http://ws.cdyne.com/">
<GetEmpResult>
<EmpID>string</EmpID>
<EmpName>string</EmpName>
<SalAmount>decimal</SalAmount>
<Error>boolean</Error>
</GetEmpResult>
</GetEmpResponse>
</soap:Body>
</soap:Envelope>
I tried all the possibilities of template matches, but not succeeded....
Can somebody help me the correct <xsl:template> to access EmpName from the above
SOAP responses...
regards
VijayHi,
Dynamic xslt are not quite supported in OSB, there are some approaches that may be helpful for your case though...
Have a look at these...
http://atheek.wordpress.com/2011/12/21/using-xalanevaluate-to-parametrize-xpath/
http://beatechnologies.wordpress.com/2010/12/01/dynamic-xquery-in-oracle-service-bus/
Let me know how you go...
Cheers,
Vlad -
SOAP Response conatins no quots, no opening or closing tags.
Hello All,
I have developed WebService and I have deployed it on a server, and I have developed client that speak with the WebService via the JDeveloper generated EmbeddedIntegrationWebServiceStub and everything goes greatly when the WebService and the Client are running locally, also it works greatly when the WebService are hosted on server and the client run locally but after I deployed the client to another testing server I found strange behavioure that the returned soap repsonse to the client contans no < or > or "" so I make some dummy solution to regenerate the missing <, >, or "" but the server (hosting the client) keeps giving me the following exception
bq. 08/10/14 00:02:18 org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486) \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712) \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696) \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683) \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208) \\ 08/10/14 00:02:18 at ae.dxbpolice.eps.xml.xmlBeans.ProcVersionsDocument$Factory.parse(Unknown Source) \\ 08/10/14 00:02:18 at ae.dxbpolice.eps.tld.tag.FormCustomTag.doStartTag(FormCustomTag.java:158) \\ 08/10/14 00:02:18 at eps_integration._jspService(_eps__integration.java:65) \\ 08/10/14 00:02:18 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) \\ 08/10/14 00:02:18 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) \\ 08/10/14 00:02:18 at com.evermind.server.http.GetParametersRequestDispatcher.newInclude(GetParametersRequestDispatcher.java:80) \\ 08/10/14 00:02:18 at com.evermind.server.http.GetParametersRequestDispatcher.include(GetParametersRequestDispatcher.java:34) \\ 08/10/14 00:02:18 at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267) \\ 08/10/14 00:02:18 at e_services._jspService(_e__services.java:333) \\ 08/10/14 00:02:18 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) \\ 08/10/14 00:02:18 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) \\ 08/10/14 00:02:18 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) \\ 08/10/14 00:02:18 at ae.gov.dphq.internet.util.InternetFilter.doFilter(InternetFilter.java:111) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) \\ 08/10/14 00:02:18 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) \\ 08/10/14 00:02:18 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208) \\ 08/10/14 00:02:18 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125) \\ 08/10/14 00:02:18 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) \\ 08/10/14 00:02:18 at java.lang.Thread.run(Thread.java:534) \\ 08/10/14 00:02:18 Caused by: org.xml.sax.SAXParseException: Unexpected element: CDATA \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038) \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723) \\ 08/10/14 00:02:18 at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454) \\ 08/10/14 00:02:18 ... 32 more \\ 08/10/14 00:02:18 javax.servlet.jsp.JspTagException: SimpleTag: error: Unexpected element: CDATA \\ 08/10/14 00:02:18 at ae.dxbpolice.eps.tld.tag.FormCustomTag.doStartTag(FormCustomTag.java:277) \\ 08/10/14 00:02:18 at eps_integration._jspService(_eps__integration.java:65) \\ 08/10/14 00:02:18 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) \\ 08/10/14 00:02:18 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) \\ 08/10/14 00:02:18 at com.evermind.server.http.GetParametersRequestDispatcher.newInclude(GetParametersRequestDispatcher.java:80) \\ 08/10/14 00:02:18 at com.evermind.server.http.GetParametersRequestDispatcher.include(GetParametersRequestDispatcher.java:34) \\ 08/10/14 00:02:18 at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267) \\ 08/10/14 00:02:18 at e_services._jspService(_e__services.java:333) \\ 08/10/14 00:02:18 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) \\ 08/10/14 00:02:18 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) \\ 08/10/14 00:02:18 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) \\ 08/10/14 00:02:18 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) \\ 08/10/14 00:02:18 at ae.gov.dphq.internet.util.InternetFilter.doFilter(InternetFilter.java:111) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649) \\ 08/10/14 00:02:18 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) \\ 08/10/14 00:02:18 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) \\ 08/10/14 00:02:18 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208) \\ 08/10/14 00:02:18 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125) \\ 08/10/14 00:02:18 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) \\ 08/10/14 00:02:18 at java.lang.Thread.run(Thread.java:534)
and this is the XML document that generate this problem
bq. <procVersions xmlns="http://www.xmlBeans.xml.eps.dxbpolice.ae"> \\ <procVersion id="2" beneficiaryType="EXTERNAL_PERSON" importanceLevel="NORMAL" isIncludeHierarchy="false" isNotifiable="false" isRemote="false" nameAR="ÇÌÑÇÁ æçÇêÉ ÇäÎÏåÉ" nameEN="Termination Procedure" status="ACTIVE" versionNo="V1"/> \\ <procVersion id="21" beneficiaryType="EXTERNAL_COMPANY" importanceLevel="NORMAL" isIncludeHierarchy="false" isNotifiable="false" isRemote="false" nameAR="ÇÌÑÇÁ ×äÈ ÃÌÇÒÉ" nameEN="Vacation Request Procedure" status="ACTIVE" versionNo="V2"/> \\ </procVersions>
so are there any suggestion about why the resposnse I got before my processing contains no < or > or " on the server however it comes gratly locally is there any library I should make sure that it doesn't exist on the server.
this is how the xml returned looks before manual adjustment
bq. procVersions xmlns=http://www.xmlBeans.xml.eps.dxbpolice.ae \\ procVersion id=2 beneficiaryType=EXTERNAL_PERSON importanceLevel=NORMAL isIncludeHierarchy=false isNotifiable=false isRemote=false nameAR=ÇÌÑÇÁ æçÇêÉ ÇäÎÏåÉ nameEN=Termination Procedure status=ACTIVE versionNo=V1/ \\ procVersion id=21 beneficiaryType=EXTERNAL_COMPANY importanceLevel=NORMAL isIncludeHierarchy=false isNotifiable=false isRemote=false nameAR=ÇÌÑÇÁ ×äÈ ÃÌÇÒÉ nameEN=Vacation Request Procedure status=ACTIVE versionNo=V2/ \\ /procVersions
and why it keeps giving me the same problem even after I have corrected the returned soap response manually
Thanks in advance
Edited by: Ali Abdel-Aziz on Oct 13, 2008 9:22 PMok, now my work arround works greatly as I was missing to pass the correct variable to the parser method and was passing the same old variable ;).
but I still wanna know what can be the reason for filtering the returned soap response and remove <, >, " from it.
Are there any Application Server configuration that can be the reason for this behavioure ?
thanks.
Edited by: Ali Abdel-Aziz on Oct 14, 2008 2:39 PM -
Hi
My PI server is able to make a soap call to the SFDC ( webservice ) ...however the response that is received within PI
has a SOAP envelope...and hence the response mapping is going in error....because the source data type in response mapping doesnot match with the soap response ( with envelope )
<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
- <soapenv:Body>
- <upsertResponse>
- <result>
<created>false</created>
<id>a0UT0000004aeaMMAQ</id>
<success>true</success>
</result>
</upsertResponse>
</soapenv:Body>
</soapenv:Envelope>
how do i handle thisHi,
I think there is an option while configuration of SOAP adapter, where you can define, not to keep SOAP envelop. Please check the option Conversion Parameters\Do Not Use SOAP Envelope and set it as per your requirement. That might solve the problem. Here is the link which can be helpful
http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm
Alternatively you need a java mapping or XSLT mapping to remove the envelop.
Here is the java mapping code to remove SOAP envelop
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
public class RemoveSoapEnvelop implements StreamTransformation{
public void execute(InputStream in, OutputStream out)
throws StreamTransformationException {
try
DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
DocumentBuilder builderel=factory.newDocumentBuilder();
/*input document in form of XML*/
Document docIn=builderel.parse(in);
/*document after parsing*/
Document docOut=builderel.newDocument();
TransformerFactory tf=TransformerFactory.newInstance();
Transformer transform=tf.newTransformer();
Element root;
Node p;
NodeList l;
int mm,n1;
//if you need to include namespace use next two lines
//root=docOut.createElement("ns0:upsertResponse");
//root.setAttribute("xmlns:ns0","http://connectsystems.be/MAINFR/AccDocument");
root=docOut.createElement("upsertResponse");
p=docIn.getElementsByTagName("upsertResponse").item(0);
l=p.getChildNodes();
n1=l.getLength();
for(mm=0;mm<n1;++mm)
Node temp=docOut.importNode(l.item(mm),true);
root.appendChild(temp);
docOut.appendChild(root);
transform.transform(new DOMSource(docOut), new StreamResult(out));
catch(Exception e)
e.printStackTrace();
public void setParameter(Map arg0) {
public static void main(String[] args) {
try{
RemoveSoapEnvelop genFormat=new RemoveSoapEnvelop();
FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\sd2.xml");
FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\removedEnvelop.xml");
genFormat.execute(in,out);
catch(Exception e)
e.printStackTrace();
input xml file sd2.xml
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
<soapenv:Body>
<upsertResponse>
<result>
<created>false</created>
<id>a0UT0000004aeaMMAQ</id>
<success>true</success>
</result>
</upsertResponse>
</soapenv:Body>
</soapenv:Envelope>
Here is the output xml removedEnvelop.xml
<?xml version="1.0" encoding="UTF-8" ?>
<upsertResponse>
<result>
<created>false</created>
<id>a0UT0000004aeaMMAQ</id>
<success>true</success>
</result>
</upsertResponse>
Helpful articles on java mapping for PI 7.1
http://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API
You can also try following XSLT mapping to get the same output as java mapping
<xsl:stylesheet version="1.0"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="SOAP-ENV">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<xsl:for-each select="SOAP-ENV:Envelope/SOAP-ENV:Body">
<upsertResponse>
<result>
<xsl:variable name="var" select="normalize-space(.)"></xsl:variable>
<xsl:variable name="tokenizedSample" select="tokenize($var,' ')"/>
<created><xsl:value-of select="$tokenizedSample[1]"/></created>
<id><xsl:value-of select="$tokenizedSample[2]"/></id>
<success><xsl:value-of select="$tokenizedSample[3]"/></success>
</result>
</upsertResponse>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Other than these please refer to following links for further examples on the topic
Remove SOAP-ENV tags from xml RECEIVER RESPONSE payload (XSL needed?)
Remove SOAP Envelop using XSLT mapping.
Hope this helps your cause.
regards
Anupam -
SOAP Response From ASP Page gives Exceptions-Why ?
Hi Friends,
I am trying to call an ASP Page by sending it a SOAP Request.
The SOAP Request reaches the ASP Page but still i am getting lot of
exceptions.This is my code from Request.java
import javax.xml.soap.*;
import java.util.*;
import java.net.URL;
public class Request {
public static void main(String[] args) {
try {
SOAPConnectionFactory scFactory =
SOAPConnectionFactory.newInstance();
SOAPConnection con = scFactory.createConnection();
MessageFactory factory =
MessageFactory.newInstance();
SOAPMessage message = factory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
SOAPBody body = envelope.getBody();
header.detachNode();
Name bodyName = envelope.createName(
"TestDtls", "m",
"urn:myserver/soap:TestThis");
SOAPBodyElement gltp =
body.addBodyElement(bodyName);
Name name = envelope.createName("PhoneOrigin");
SOAPElement symbol = gltp.addChildElement(name);
symbol.addTextNode("0672324228");
URL endpoint = new URL
("http://john/myservices/testsoap.asp");
message.writeTo(System.out);
SOAPMessage response = con.call(message, endpoint);
response.writeTo(System.out);
SOAPPart sp = response.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPBody sb = se.getBody();
Iterator it = sb.getChildElements(bodyName);
SOAPBodyElement bodyElement =
(SOAPBodyElement)it.next();
String myvalue = bodyElement.getValue();
System.out.print("The Value Retrived is ");
System.out.println(myvalue);
con.close();
} catch (Exception ex) {
System.out.println(ex);
This is what i have in my ASP Page: testsoap.asp
<%
Set objReq = Server.CreateObject("Microsoft.XMLDOM")
objReq.load(Request)
strmycode = "SOAP-ENV:Envelope/SOAP-ENV:Body/m:TestDtls/PhoneOrigin"
varPhoneOrigin=objReq.SelectSingleNode(strmycode).text
status="ok"
strReturn = "<SOAP-ENV:Envelope xmlns:SOAP=""urn:schemas-xmlsoap-org:soap.v1"">" & _
"<SOAP-ENV:Header></SOAP-ENV:Header>" & _
"<SOAP-ENV:Body>" & _
"<m:TestDtlsResponse xmlns:m=""urn:myserver/soap:TestThis"">" & _
"<PhoneStatus>" & Status & "</PhoneStatus>" & _
"</m:TestDtlsResponse>" & _
"</SOAP-ENV:Body>" & _
"</SOAP-ENV:Envelope>"
Response.Write strReturn
%>
The Exceptions i get are as follows:
=====================================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S
OAP-ENV:Body><m:TestDtls xmlns:m="urn:myserver/soap:TestThis"><PhoneOrigin>"0672
324228"</PhoneOrigin></m:TestDtls></SOAP-ENV:Body></SOAP-ENV:Envelope>Jul 11, 20
03 6:37:35 PM com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType
SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a S
OAP message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
Jul 11, 2003 6:37:35 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
SEVERE: SAAJ0535: Unable to internalize message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:2
02)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:te
xt/html. Is this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
... 7 more
CAUSE:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
CAUSE:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
nImpl: Unable to internalize message
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize m
essage
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:2
02)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
... 3 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:te
xt/html. Is this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
... 7 more
Actually,i need to see the response in XML format as per my program.
But,What does all this stuff mean ? I have using latest jwsdp 1.2.
Can Anyone Help me on this ?i have the same problem. when i make a test with a VB client, the SOAP message is builded this way "<SOAP.... instead of <SOAP-ENV.... tag generated by java. When a make a test in vb client using this syntax (SOAP-ENV), the asp page returns a error:
<font face="Arial" size=2>
<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a01a8'</font>
<p>
<font face="Arial" size=2>Object required: 'objXMLDOM.selectSingleNode(...)'</font>
<p>
<font face="Arial" size=2>/rcruz/soap/vbSoap/simplesoap.asp</font><font face="Arial" size=2>, line 6</font>
Anyone have a idea???
Thanks -
Hi,
We are having a problem reading Soap Response:
Scenario: From XI/PI we are calling a webservice with Synchronous
message with WS-Security including Authentication, Signature, TimeStamp
and Encryption using SOAP Receiver Adapter. We are able to send the
request successfully and also the webServer is able to understand the
request and sending the response back. The problem is the PI is unable
to read the response and giving a below error:
com.sap.aii.af.ra.ms.api.DeliveryException: expecting end tag:
Transform, but found
InclusiveNamespaces at state 1
We tested successfully end-end with NON-Secured sites with out WS-
Security.
Please let me know if you have seen this error or any thoughts.
Thanks,
Laxman
This is the actual Request Message:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:getUser xmlns:ns0="http://csa -namespace:8090/ddsssaws/IdentityManagementService">
<string>XYZ123</string>
</ns0:getUser>
Also we extracted raw traffic using TCPMon:
Below is the raw-traffic of SOAP adapter (used TCPGateway to capture the traffic)
Request:
POST /edsssaws/IdentityManagement HTTP/1.0
Accept: /
Host: 999.97.19.45:9999
User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505
Content-ID: <soap-1f3af770018111ddc0d300144f2515b0Atsap.com>
Content-Disposition: attachment;filename="soap-1f3af770018111ddc0d300144f2515b0Atsap.com.xml"
Content-Type: text/xml; charset=utf-8
Content-Description: SOAP
Content-Length: 5530
SOAPACTION:
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header><wsse:Security xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' SOAP:mustUnderstand='1'><wsse:BinarySecurityToken xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='sap-9' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3' EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>MIIFFTCCBH6gAwIBAgIKZptrmQABAAALBTANBgkqhkiG9w0BAQUFADByMRMwEQYKCZImiZPyLGQBGRYDY29tMRMwEQYKCZImiZPyLGQBGRYDZWRzMRQwEgYKCZImiZPyLGQBGRYEY29ycDEUMBIGCgmSJomT8ixkARkWBGFtZXIxGjAYBgNVBAMTEUVEUyBFbnRlcnByaXNlQ0ExMB4XDTA4MDQwMTIxMjMyN1oXDTEwMDQwMTIxMjMyN1owIjELMAkGA1UEBhMCVVMxEzARBgNVBAMTCklUQVBJTlRERVYwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALjKvScjIEmp5Q1X3/gfR0WZO22KiEAOAx9kM0q3kpT/0dk2ZVit5YCBT4Zkt6Tttyh21xmnCcVgcRo0YOxXcXrLq25HRsSbxY3Zu37qq4tqExX5gQCtfR1pRjRrhQfDPmPGzFOrTzSjxJ5BH49p3KZcUhj7KpWQEakDBvJAgMBAAGjggMAMIIC/DAdBgNVHQ4EFgQUadHS0gj0CBQymaNnAlGJphSCB/YwHwYDVR0jBBgwFoAULNVTI/CtjM0k4MlzJLuQI4tVUy8wggEaBgNVHR8EggERMIIBDTCCAQmgggEFoIIBAYaBxWxkYXA6Ly8vQ049RURTJTIwRW50ZXJwcmlzZUNBMSgxKSxDTj11c3Bsc3NjYTAwMixDTj1DRFAsQ049UHVibGljJTIwS2V5JTIwU2VydmljZXMsQ049U2VydmljZXMsQ049Q29uZmlndXJhdGlvbixEQz1jb3JwLERDPWVkcyxEQz1jb20/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdD9iYXNlP29iamVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50hjdodHRwOi8vd3d3LmVkcy5jb20vY3J0cmV2bHN0L0VEUyUyMEVudGVycHJpc2VDQTEoMSkuY3JsMIIBDwYIKwYBBQUHAQEEggEBMIHMIG2BggrBgEFBQcwAoaBqWxkYXA6Ly8vQ049RURTJTIwRW50ZXJwcmlzZUNBMSxDTj1BSUEsQ049UHVibGljJTIwS2V5JTIwU2VydmljZXMsQ049U2VydmljZXMsQ049Q29uZmlndXJhdGlvbixEQz1jb3JwLERDPWVkcyxEQz1jb20/Y0FDZXJ0aWZpY2F0ZT9iYXNlP29iamVjdENsYXNzPWNlcnRpZmljYXRpb25BdXRob3JpdHkwQwYIKwYBBQUHMAKGN2h0dHA6Ly93d3cuZWRzLmNvbS9jcnRyZXZsc3QvRURTJTIwRW50ZXJwcmlzZUNBMSgxKS5jcnQwDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCBLAwPAYJKwYBBAGCNxUHBC8wLQYlKwYBBAGCNxUIh4qV4WN/hPFkRuHwclug63SWS2GpOIihPT8LwIBZAIBBDATBgNVHSUEDDAKBggrBgEFBQcDATAbBgkrBgEEAYI3FQoEDjAMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4GBAGzyuh56APinQtmE9oWsT8NHcQqMASHZnN26RAofnxuIUH1VyBK2CGyiiDnCS0cDIGBl45sqOO8uRClE7CngeZEAV9JL5bhpUF6rywmFKvqe5FyqnrScczeaODV0g9sO4vUrwdGlReA5ncvtSN/u82MWDqtHAHBfpYQxZUrW</wsse:BinarySecurityToken><wsu:Timestamp xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='wsu-targetID-1f10b320-0181-11dd-aebd-00144f2515b0'><wsu:Created ValueType='xsd:dateTime'>2008-04-03T13:23:17Z</wsu:Created><wsu:Expires ValueType='xsd:dateTime'>2008-04-03T13:25:17Z</wsu:Expires></wsu:Timestamp><xenc:EncryptedKey xmlns:xenc='http://www.w3.org/2001/04/xmlenc#' Id='EK52789332'><xenc:EncryptionMethod Algorithm='http://www.w3.org/2001/04/xmlenc#rsa-1_5'/><ds:KeyInfo xmlns:ds='http://www.w3.org/2000/09/xmldsig#'><wsse:SecurityTokenReference><wsse:KeyIdentifier ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier' EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>ykCivrkfwQdj30aJid9VGnjtY=</wsse:KeyIdentifier></wsse:SecurityTokenReference></ds:KeyInfo><xenc:CipherData><xenc:CipherValue>Fi5B3uBMSp4nAKh3rLAs4DJQ5iCLoupE1oq3VOFueea1Y90xI200OFraV2mRS2ywsejH36nwy
XYPuB5ZQScJampqZDtTR28cq890s4sEKFpycsNyNM9VScWaVoi4nKBKRIdGVoLgLf+NrmzJnXD
6eb4F6tWWyw8g2FJel4=</xenc:CipherValue></xenc:CipherData><xenc:ReferenceList><xenc:DataReference URI='#ED13608949'/></xenc:ReferenceList></xenc:EncryptedKey><ds:Signature xmlns:ds='http://www.w3.org/2000/09/xmldsig#'><ds:SignedInfo><ds:CanonicalizationMethod Algorithm='http://www.w3.org/2001/10/xml-exc-c14n#'/><ds:SignatureMethod Algorithm='http://www.w3.org/2000/09/xmldsig#rsa-sha1'/><ds:Reference URI='#wsuid-body-1f108c10-0181-11dd-838e-00144f2515b0'><ds:Transforms><ds:Transform Algorithm='http://www.w3.org/2001/10/xml-exc-c14n#'/></ds:Transforms><ds:DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/><ds:DigestValue>UaW58GCrg/nrA/EfW+OyHP2DCio=</ds:DigestValue></ds:Reference><ds:Reference URI='#wsu-targetID-1f10b320-0181-11dd-aebd-00144f2515b0'><ds:Transforms><ds:Transform Algorithm='http://www.w3.org/2001/10/xml-exc-c14n#'/></ds:Transforms><ds:DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/><ds:DigestValue>LFuszgJ412Fe8PRtK3W69RTXndY=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>K4iZoVGhuI41fj9BdXx7wUz/JEi2pqh60gZZta8tOfaVmC1PfNtPg61N0sYescfM4RmkQpDorS1d
VB/DAJKz173HTD5rn/SuwmYgql4aVKPNlIDD90ZXoJ/mfzwT/Kei6yjWtvCYthCxaUtP/LFDB/dA
mr1OUAj9X2DHkzF6g=</ds:SignatureValue><ds:KeyInfo><wsse:SecurityTokenReference><wsse:Reference URI='#sap-9'/></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></SOAP:Header><SOAP:Body xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='wsuid-body-1f108c10-0181-11dd-838e-00144f2515b0'><xenc:EncryptedData xmlns:xenc='http://www.w3.org/2001/04/xmlenc#' Type='http://www.w3.org/2001/04/xmlenc#Content' Id='ED13608949'><xenc:EncryptionMethod Algorithm='http://www.w3.org/2001/04/xmlenc#tripledes-cbc'/><xenc:CipherData><xenc:CipherValue>lZkC7zZZfqBUg5rnqMZypi5ZvnPBvw36fjeFmCDQ5DMDjKXShO4apBjBE3gUsLGL1TMli18D0NWK
dmVHQTePitGhvQ7YiyaXgjekZckS2P91Qv/9Zut5/hzCYhgVarnUgGmr8Qi4aSYXCY0oBD6SzVXy
/UoQHPASF3mhYPaFBtmTJu2dHmV6v4HTKC+Om0</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData></SOAP:Body></SOAP:Envelope>
Response:
HTTP/1.1 200 OK
Date: Thu, 03 Apr 2008 13:23:54 GMT
Content-Length: 9511
Content-Type: text/xml
Set-Cookie: JSESSIONID=cTPmH0hKYvKqK427JJb573FT1RWZhHY5l7XnLlsjsk6yRkS2g5y6!1973031667; path=/
Connection: close
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" env:mustUnderstand="1"><xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"></xenc:EncryptionMethod><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><wsse:SecurityTokenReference><wsse:KeyIdentifier xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier" wsu:Id="Id-dgdMMmsGkjae8aSYF_59_xwe" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">adHS0gj0CBQymaNnAlGJphSCB/Y=</wsse:KeyIdentifier></wsse:SecurityTokenReference></dsig:KeyInfo><xenc:CipherData><xenc:CipherValue>mbOmTXSiYuEiWHbP3dbrDXFpZaSoQ084wMBt7uRxNo49p1fpQBkDpr/H2wPNbHy4qzSTVzP7EESzWFjFEb/7BH3dt4JuyzBFH1M0X77YBW5YHNGpiUmj934ziydojqcU6jWBsUaFxXsAPmvy0q3vVk8xnZcQHxMNhPS5ebK9o=</xenc:CipherValue></xenc:CipherData><xenc:ReferenceList><xenc:DataReference URI="#Id-yMgwZrtQctSvW1mT1sDWdZ8D"></xenc:DataReference></xenc:ReferenceList></xenc:EncryptedKey><wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="Id-2DXBQHwdRE0oquWQV0mjtw1U" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MIIFVjCCBLgAwIBAgIKfps5MgABAAADHjANBgkqhkiG9w0BAQUFADByMRMwEQYKCZImiZPyLGQBGRYDY29tMRMwEQYKCZImiZPyLGQBGRYDZWRzMRQwEgYKCZImiZPyLGQBGRYEY29ycDEUMBIGCgmSJomT8ixkARkWBGFtZXIxGjAYBgNVBAMTEUVEUyBFbnRlcnByaXNlQ0ExMB4XDTA2MDUyMzIzMDY0OVoXDTA4MDUyMjIzMDY0OVowYzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlRYMQ4wDAYDVQQHEwVQbGFubzEMMAoGA1UEChMDRURTMQwwCgYDVQQLEwNTRFMxGzAZBgNVBAMTElNTQVdlYlNlcnZpY2VzLURFVjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0qRmvQkxnPnEZQNSabPVwM6sEf8vFUOAlgQ9uuiDImVmDw4Afg45zbmTBeDdv4wsIap7kI4VJhv60SdOQg6i1mIEi83Qk7UJYD8XvKuOalSLYhHu92lsp0kIZlAdzipVd1Pp0cI3wSvP6o9zfX0gALpisf8rGJ1CkVWbtHaVp0CAwEAAaOCAwAwggL8MB0GA1UdDgQWBBTKT4KKuR/7BB2PfRomJ31UaeO1jAfBgNVHSMEGDAWgBQs1VMj8K2MzSTgyXMku5Aji1VTLzCCARoGA1UdHwSCAREwggENMIIBCaCCAQWgggEBhoHFbGRhcDovLy9DTj1FRFMlMjBFbnRlcnByaXNlQ0ExKDEpLENOPXVzcGxzc2NhMDAyLENOPUNEUCxDTj1QdWJsaWMlMjBLZXklMjBTZXJ2aWNlcyxDTj1TZXJ2aWNlcyxDTj1Db25maWd1cmF0aW9uLERDPWNvcnAsREM9ZWRzLERDPWNvbT9jZXJ0aWZpY2F0ZVJldm9jYXRpb25MaXN0P2Jhc2U/b2JqZWN0Q2xhc3M9Y1JMRGlzdHJpYnV0aW9uUG9pbnSGN2h0dHA6Ly93d3cuZWRzLmNvbS9jcnRyZXZsc3QvRURTJTIwRW50ZXJwcmlzZUNBMSgxKS5jcmwwggEPBggrBgEFBQcBAQSCAQEwgf4wgbYGCCsGAQUFBzAChoGpbGRhcDovLy9DTj1FRFMlMjBFbnRlcnByaXNlQ0ExLENOPUFJQSxDTj1QdWJsaWMlMjBLZXklMjBTZXJ2aWNlcyxDTj1TZXJ2aWNlcyxDTj1Db25maWd1cmF0aW9uLERDPWNvcnAsREM9ZWRzLERDPWNvbT9jQUNlcnRpZmljYXRlP2Jhc2U/b2JqZWN0Q2xhc3M9Y2VydGlmaWNhdGlvbkF1dGhvcml0eTBDBggrBgEFBQcwAoY3aHR0cDovL3d3dy5lZHMuY29tL2NydHJldmxzdC9FRFMlMjBFbnRlcnByaXNlQ0ExKDEpLmNydDAMBgNVHRMBAf8EAjAAMAsGA1UdDwQEAwIEsDA8BgkrBgEEAYI3FQcELzAtBiUrBgEEAYI3FQiHir5XhY3E8WRG4fByW6DrdJZLYak4iKE9PwvAgFkAgEEMBMGA1UdJQQMMAoGCCsGAQUFBwMBMBsGCSsGAQQBgjcVCgQOMAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQEFBQADgYEALsVozc1aVcPNBVsRXRbAiStchxG2fKDOt9kRzL6BHtQa/fkp81EjOBhETn8N1IHLUsINn05wGgdDA2UszjLtRIpQmdpCyh2gzFW8Dlx5X7vJyvJsoDOPDBArv55dTjCEfok1oz3ux3mrVotuvr1pKIVTr7ylpRM8p8GBXw=</wsse:BinarySecurityToken><dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:CanonicalizationMethod><dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></dsig:SignatureMethod><dsig:Reference URI="#Id-wS1xP_ArcYYXY4qkqYznI7_W"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>tr3NrozQWsKrvH38naIEnQXrzgQ=</dsig:DigestValue></dsig:Reference><dsig:Reference URI="#Id-1vPAqVSMhSLH3WiBQkTTfldz"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><c14n:InclusiveNamespaces xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xsd n1"></c14n:InclusiveNamespaces></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>AUWlqeyq6w5LQnggK5dT6flLUU=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>Yx5Pre8VChTLOhPVln5xhO21dM93a2FPxQTsZY1BBIWlqeHkAEQqXvhI/EU459QZIGDOubLK0Z9AT0SRmDOgtnWNBT0duqveQ1Ippbd0hXaehW48ObrMIKnYfq5ub1kNYv9mslybPRZw9OaiijNmLfIty8qc8ctRV0lFwAjcQyk=</dsig:SignatureValue><dsig:KeyInfo><wsse:SecurityTokenReference><wsse:Reference URI="#Id-2DXBQHwdRE0oquWQV0mjtw1U"></wsse:Reference></wsse:SecurityTokenReference></dsig:KeyInfo></dsig:Signature><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-wS1xP_ArcYYXY4qkqYznI7_W"><wsu:Created>2008-04-03T13:23:55.459Z</wsu:Created></wsu:Timestamp></wsse:Security></env:Header><env:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" wsu:Id="Id-1vPAqVSMhSLH3WiBQkTTfldz"><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Content" Id="Id-yMgwZrtQctSvW1mT1sDWdZ8D"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"></xenc:EncryptionMethod><xenc:CipherData><xenc:CipherValue>LB6IKwEJgvTPdPGNeIzcpjPjC9GXi3sou5PaCnF3m4x6ToA6gDV5Sw/ODnCEeqFURgWFX8ZgxYF9YJdyj7ERAifs8MNBh/rHCitT02mU8pirwGdqSXlfCX4KYsHtUnyiGKbbMCwvCCs4LgBPnx8tCN39aazA1Ge/5JPfwupYMU/lAbyajdP1qva/gxhMCqGkgAnQgB1TJDfARvDsJnx6p2zqKsnRnNreBFClyBG7GHeMvpnzg4poPCFlj2baIoK2CSQmVbPdcPk4rgg1PAWDQwIIzBCKpZjysHeb/sW9jObekbnn4mCnUdzjRERoklstpZNeWKi/jLEaNsIX1ixhsUyWIyknYGaBjDiiGqmS6BIO1RHu0SydiMv1L/FzIWgyO9VhilGdTWsVDP6CxljxTqg41bobuPazkjQHyBK9rCGQI9J/bjSiA2S6FBDHxhA6SfDjyhvGzDhGNLMd/***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</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData></env:Body></env:Envelope>Any thoughts???
Appreciate your input.
Thanks,
Laxman -
WebService SOAP response problems
hey,
I'm developing a WebService, using EJB's. I have a session bean, which has several methods. One of them returns, say, a class like follows:
class TeamDTO implements Serializable {
private String name;
private Integer teamId;
//getters and setters ..
I have several such methods returning various, very similar, classes. Now the problem is, when I try to test my application in the Web Services Navigator the response NEVER contains all the fields I wish. Why is that? Example of a response:
<SOAP-ENV:Envelope ...>
<SOAP-ENV:Body>
<rpl:getAllTeamsResponse ... >
<rpl:Response ...>
<pns:TeamDTO>
<pns:name>team0</pns:name>
</pns:TeamDTO>
</rpl:Response>
</rpl:getAllTeamsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But the TeamDTO class has apart from a name field an teamId field as well. What happened?! The same happens to other classes, but there's no rule about the missing column (first I thought it's the PK, like in the above example, but that's not the case).
What am I doing wrong? Ah, the fields are definetely not null, since in the above case it's a PK.
regards,
KornelHey,
thanks for your hint, but that's not the problem here - for the example I've posted above java.lang.Integer won't appear, and for another case java.lang.String (whereas in my example String appeared). I'm sure the problem is somewhere else.. What happens if the field is null, will the appropriate tag appear in the soap response?
regards,
Kornel -
An XML / SOAP response to interprete ?
hi all
i have a simple class that call a webservice and gets back an xml response, with SOAP.
here is a sample :
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<BonjourResponse xmlns="http://tempuri.org/">
<BonjourResult>Bonjour string</BonjourResult>
</BonjourResponse>
</soap:Body>
</soap:Envelope>
i just want to get the string sent in the response (between the <BonjourResult> tags)
what should i do to treat this xml ?
for the moment i retrieve this xml this way :
URL endpoint = new URL("http://val1nt10/PCS_Integration/SynchronizeProfiles.asmx");
URLConnection con = endpoint.openConnection ();
con.setDoInput (true);
con.setDoOutput (true);
con.setUseCaches (false);
con.setAllowUserInteraction(false);
con.setRequestProperty ("Content-Length", Integer.toString (request.length));
con.setRequestProperty ("Content-Type", "text/xml; charset=utf-8");
con.setRequestProperty ("SOAPAction", "\"http://tempuri.org/Bonjour\"");
OutputStream out = con.getOutputStream ();
out.write (request);
out.flush ();
out.close();
InputStream in = con.getInputStream();
regards,The SOAP message minus the mime headers(i.e. Content-length) is an xml file. You can parse this file using a SAX or DOM parser. The soap message will be on the request input stream. Read the soap message into a string and then create an inputSource of this string, then use a sax parser to parse this input. You can write a contenthandler to look for certain element tags and extract its content which you can then place in the response output stream. For details on using sax look at java.sun.com/xml for the xml tutorial.
hope this helps. -
How can i custom the xml soap response in my ws?
Hello there,
Im developing a ws in weblogic 10.2 and i need to return a complex type soap response with a custom xml created by me... can any one give me an advice on how can i do that? Im not used to soap ws
And i need to return a lot of info some times and some of them are ArrayList of an object. Like the info of a Client and all the contracts of this client (and the info of that contract)... a lot of xml element with childs.
Thanx in advance for any help
PS. I tried to post an xml as example but i couldnt do it using '{' code '}' tag
Edited by: mgaldames on 08-dic-2010 8:50Hi Riyaz,
Thanks for your immediate response.
Here is my requirement.
I have created a ZTABLE with Field AUART and this table is maintain table using SM30.
When I Press F4, it will giving the list of all the order types available in T003O table and can select one and I can proceed succussfully.
But when using SM30 I need to give '*' in the column for AUART which is not available in T003O table.
I need to save my entires for AUART with * also( The value "*" is not available in Check table T003O ).
Please let me know how can I do this.
Thanks in advance. -
Hi All,
We have a scenario of FTP-->PI---> Webservice. While triggering the data in the FTP, it is failing in the PI with the below error
SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. ---> There is an error in XML document (1, 447). ---> Input string was not in a correct format.
Can you please help?Hi Raja- It seems to be a data quality issue.
Check for the value @ 1447 position in the xml message that you are trying to send to web service..
may be a date filed/decimal value which is not in expected format. -
Hi there,
I am trying to publish a file from SAP as web service using XI and SOAP Adapter.
I am using ABAP proxy to get the data into XI.
Designing and Configuration in XI has no problems because when i use File adapter the data is trasmitted to FTP server.
But when I used SOAP Reciever adapter I am getting following error in RWB
Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Error during parsing of SOAP header.
<b>Scenario</b>: SAP ABAP Proxy -> XI -> WebService. Asynchronous.
<b>SOAP</b> Receiver adaptor.
<b>Target URL</b> http://<host>:<port number >/sap/xi/engine?type=entry&version=3.0&Sender.Service=SAPDC2653&Interface=urn:bzttest:00:hsa:test%5EOB_MI_BZT_TEST&QualityOfService=ExactlyOnce
Do not use SOAP Envelop is checked.
<b>SOAP Action</b> http://sap.com/xi/WebService/soap1.1
What i am missing here? How should I solve this problem?
Any help is appreciated,
Thx,
YogiSay there's a bapi/rfc that you want to call on an R/3 backend (e.g. 4.6c). On it's own, the R/3 system cannot expose the rfc/bapi as a web service, but XI can. So in this case, the scenario would be:
WS client -> XI -> R/3
When XI "exposes" a web service, it is exposing a service for a receiving system (in the above example, the R/3 system). XI itself does not provide or contain the service implementation. When XI exposes a web service, it is always done via the <b>sender</b> soap adapter (i.e. if soap adapter is used). Receiver soap adapter is used to call or consume an actual web service from an external application.
Regards,
Jin -
SOAP : response message contains an error Application/UNKNOWN/APPLICATION_E
Hi All,
I am working in a Proxy to SOAP synchronous scenario. Message is processing successfully through IE but i am getting the below error in receiver (SOAP) communication channel.
SOAP : response message contains an error Application/UNKNOWN/APPLICATION_ERROR.
Please suggest what will be possible way out to resolve this issue.
Thanks,
Priya RanjanDear Priya
Have you configured Fault Message for this scenario.
This kind of error is generally thrown by the end target system where the message is not processed succesfully due to some error in there system.
Sourabh
Maybe you are looking for
-
In PO - Delivery address usages
Hi, In ME22n, item column having a tab as Delviery address, here we are able to change the vendor / customer name... what's usage of this tab??? and MEAN tcode is used for what purpose??
-
Does anybody know where I can buy good plugins for Final Cut Pro? I'm looking more for the dramatic type of plugins...such as flickering in and out of the edges of the video, things like that. The closest movie that I can think of that has a lot of t
-
Screen layout discrepancy between AS01 and AS91
Hi Everyone, We are trying to create an asset via AS01 and we noticed that the field for serial number is grayed-out. However, in the screen layout settings for the asset master record, the serial number is defined as optional. On the other hand, if
-
I am trying to install Indesign and get an error EX11. Installation failed. Impossible to unpack to temporary folder. the temp folder (%temp%) has been cleaned. Any Ideas?
-
Suppress writing cache files with rwrun.exe
Hello, we`re using rwrun.exe (9.0.4.2.0) with parameters to create pdf-files in a loop: REPORT=mytest.rdf USERID=scott/tiger@orcl BLANKPAGES=no DESTYPE=file DESNAME=mytest.pdf DESFORMAT=PDF OUTPUTIMAGEFORMAT=GIF CACHELOB=NO Each process write a cache