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.

Similar Messages

  • 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

  • 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 &lt; or &gt; or "" so I make some dummy solution to regenerate the missing &lt;, &gt;, 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.      &lt;procVersions xmlns="http://www.xmlBeans.xml.eps.dxbpolice.ae"&gt; \\     &lt;procVersion id="2" beneficiaryType="EXTERNAL_PERSON" importanceLevel="NORMAL" isIncludeHierarchy="false" isNotifiable="false" isRemote="false" nameAR="&Ccedil;&Igrave;&Ntilde;&Ccedil;&Aacute; &aelig;&ccedil;&Ccedil;&ecirc;&Eacute; &Ccedil;&auml;&Icirc;&Iuml;&aring;&Eacute;" nameEN="Termination Procedure" status="ACTIVE" versionNo="V1"/&gt; \\     &lt;procVersion id="21" beneficiaryType="EXTERNAL_COMPANY" importanceLevel="NORMAL" isIncludeHierarchy="false" isNotifiable="false" isRemote="false" nameAR="&Ccedil;&Igrave;&Ntilde;&Ccedil;&Aacute; &times;&auml;&Egrave; &Atilde;&Igrave;&Ccedil;&Ograve;&Eacute;" nameEN="Vacation Request Procedure" status="ACTIVE" versionNo="V2"/&gt; \\     &lt;/procVersions&gt;
    so are there any suggestion about why the resposnse I got before my processing contains no &lt; or &gt; 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=&Ccedil;&Igrave;&Ntilde;&Ccedil;&Aacute; &aelig;&ccedil;&Ccedil;&ecirc;&Eacute; &Ccedil;&auml;&Icirc;&Iuml;&aring;&Eacute; nameEN=Termination Procedure status=ACTIVE versionNo=V1/ \\ procVersion id=21 beneficiaryType=EXTERNAL_COMPANY importanceLevel=NORMAL isIncludeHierarchy=false isNotifiable=false isRemote=false nameAR=&Ccedil;&Igrave;&Ntilde;&Ccedil;&Aacute; &times;&auml;&Egrave; &Atilde;&Igrave;&Ccedil;&Ograve;&Eacute; 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 PM

    ok, 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 &lt;, &gt;, " 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

  • 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, "&lt;" and "&gt;".
    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')
    ¯\_(ツ)_/¯

  • 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
    Vijay

    Hi,
    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

  • Data from SOAP response not getting into Flex object

    I'm trying to get data from an ALM application we use(Collabnet TeamForge) using a SOAP webservice, and am running into a problem.  I should mention that I am new to both Flex, and webservices.
    I used the "Import Web Services" option in Flex Builder 3, and had it generate code for all operations in the WSDL.  Some of them work just fine.  However, there are several where the data from the SOAP response does not get into the Flex object. The senario that doesn't work is when the response contains a data type that extends another datatype.  In TeamForge, they have a type called TrackerSoapRow.  It extends FolderSoapRow, adding 3 fields.  The problem seems to be that in the response from TeamForge, the 3 fields defined in TrackerSoapRow are in the middle of the fields defined in FolderSoapRow.  I've debugged into it, and the problem occures in mx.rpc.xml.XMLDecoder.getApplicableValues( starting at line 2204 of XMLDecoded.as).  As I read the code, the only way a match can be found is if the fields in the response are in the exact same order as in the definintion.  When its processing the extended data type(  by a call to XMLDecoder.decodeComplexExtension ) at some point, one of the derived type's fields is encountered, and the process stops.
    I have called the service using soapui and verified that all the data I expect is in the response.
    As I mentioned, I'm new to web services.  So, I suppose its possible that the format of the data being returned from TeamForge is incorrect.  That they are not supposed to intermingle base and derived fields.  If thats the case, then I need to report this as a bug to Collabnet.
    All help is appreciated.
    Marc Robertson

    Not knowing any of the details about how you call a web service from OAF myself - I'd suggest you post on the proper forum for OA Framework questions: {forum:id=210}
    John

  • 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

  • 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,
    Kornel

    Hey,
    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

  • 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:50

    Hi 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.

  • SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPT

    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,
    Yogi

    Say 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

  • How to deal with complex SOAP responses when calling web services ???

    Hi all,
    I have an issue when calling a web service that returns a complex
    SOAP response message. With simple responses (e. g. array of strings) it
    worked.
    I created the PDF as an Interactive form with Livecycle Designer 8.2.
    The Javascript looks like this:
    var cURL = "http://blabla";
    var cTestString = "too";
    SOAP.wireDump=true;
    var response = SOAP.request(
         cURL: cURL,
         oRequest: {
              "http://blabla.com/:complete" : {
              arg0: cTestString
              cAction: "http://bla.com:50000/"
    var resp = response["http://blabla.com:serviceResponse"];
    console.println("lenght:"+resp.length);
    var myns = "http://blabla.com/namespace";
    for (var nItem in resp.return)
      console.println("" + nItem + " " + resp.return[nItem] );
         for (var ConceptView in resp.return[nItem])
           console.println("  "+resp.return[nItem].length);
           console.println("  "+ConceptView+" "+resp.return[nItem][ConceptView] );
           if (ConceptView == myns + ":Response")
              for (var item2 in resp.return[nItem][ConceptView]){
                  console.println("    "+item2+" "+resp.return[nItem][ConceptView][item2] );
    I call the service and when I realized that I do not find out the type of the object returned, I used the nested for-in-loops to iterate through it. But it seems that there is just one item in the Javascript object returned, although the SOAP message clearly shows that there are more than one item.
    Can you help me?
    One key problem when analyzing this issue is that I do not know at all
    the Javascript type of response. We suspected it might be an array, but it is not
    because the method .length returns "undefined". It would already be
    helpful to know at least the type of this object and to know callable
    methods and so on ...
    Best regards
    Christoph
    P.S. As mentioned I used Livecycle Designer 8.2 and displayed and
    debugged the document using Acrobat 9.

    Christoph,
    Firstly LiveCycle Designer 8.2 is still not supported to develop forms as per my knowledge. The latest version compatible for SAP Interactive Forms is ALD 8.0.
    There is a difference between Acrobat based forms and LiveCycle forms and based on your coding it looks to me  that you are trying to create a LiveCycle based form with coding of Acrobat which is not supported in LiveCycle Desginer, which is why you may be getting the error.
    I hope that does not confuse you, so may check this [link|http://www.acrobatusers.com/articles/2006/08/designer_or_forms/index.php] for some clear information on what point I was trying to make.
    Chintan

  • Soap response with envelope

    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 this

    Hi,
    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

  • WebService response object in XML - parsing attributes

    Hi- new to Flex and I'm trying to parse out the attributes of the response object. I can get the entire object and see that its working, but I cant get just a single attribute. It pulls weather info for world cities. For example, I just want the location name and temperature.
    Any advice on this? Thanks!
    <?xml version="1.0"?>
    <!-- fds\rpc\RPCResultFaultMXML.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:s="library://ns.adobe.com/flex/spark">
        <mx:Script>
            <![CDATA[
                import mx.rpc.soap.SOAPFault;        
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                import mx.controls.Alert;
                import mx.utils.ObjectUtil;
                public function showErrorDialog(event:FaultEvent):void {
                    // Handle operation fault.
                    Alert.show(event.fault.faultString, "Error");
                public function defaultFault(event:FaultEvent):void {
                    // Handle service fault.
                    if (event.fault is SOAPFault) {
                        var fault:SOAPFault=event.fault as SOAPFault;
                        var faultElement:XML=fault.element;
                        // You could use E4X to traverse the raw fault element returned in the SOAP envelope.
                    Alert.show(event.fault.faultString, "Error");              
                public function log(event:ResultEvent):void {
                    // Handle result.
                    trace(event.result);
                    //trace(ObjectUtil.toString(event.result));
                    //var len:int;
                    //len = event.result.length;
                    //trace(len);
                    //trace(event.result);
                    //trace(event.result.GetWeatherResponse.Location);
                    //var myXML:XML = new XML(event.result);
                    //trace(myXML.attribute("Location"));
            ]]>
        </mx:Script>
        <mx:WebService id="WeatherService" wsdl="http://www.webservicex.com/globalweather.asmx?wsdl"
                       fault="defaultFault(event)">
            <mx:operation name="GetWeather"
                          fault="showErrorDialog(event)"
                          result="log(event)"
                          resultFormat="xml">
                <mx:request>
                    <CityName>{myCity.text}</CityName>
                    <CountryName>{myCountry.text}</CountryName>
                </mx:request>
            </mx:operation>
        </mx:WebService>
        <mx:TextInput id="myCity" text="Madrid"/>
        <mx:TextInput id="myCountry" text="Spain"/>
        <!-- Call the web service operation with a Button click. -->
        <mx:Button width="60" label="Get Weather"
                  click="WeatherService.GetWeather.send();"/>
        <!-- Display the Weather -->
        <mx:Label text="Weather:"/>
        <mx:TextArea text="{WeatherService.GetWeather.lastResult}" height="200"/>
    </mx:Application>

    The WSDL says GetWeatherResponse is a string, and it appears to be a string of XML, so set <mx:operation resultFormat="object"> as this will unwrap the SOAP response value and leave a string typed value intact. You can then create a new ActionScript 3.0 E4X-based XML instance from the unwrapped string:
        var myXML:XML = new XML(event.result.toString());
    You can then travese the XML document using E4X syntax, a simple example is included below:
        trace(myXML..Location);
        trace(myXML..Temperature);

  • Idoc to soap scenario - soap response error

    hi
    i am using pi 731 single stack.
    the scenario is idoc to soap. the message mapping is working fine and output is generated successfully.
    the message is failing in mesage monitor and communication channel monitor. error is -
    Exception caught by adapter framework: SOAP: Response message contains an errorXIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: VEN-OMI-1007:
    This scenario is async scenario. How to soap remove this response message error.
    rgds

    Dear,
    IDoc to Soap scenario we have to import wsdl at receiver end and map the field from the mapping document but some times receiver end some changes may happen. if it is correct only your mapping we have to conclude from the below points.
    1. Check the mapping in Message Mapping and Operation Mapping Test and conclude.
    2. you should check url from receiver that is correct or wrong.
    3. ask the wsdl from receiver end.
    the given ED and receiver side application is same this type of error will not come.
    Please check at receiver application or else what ever new fields are added in reciver may be miss mach of ED.
    Regards,
    Kiran Polani

  • Weblogic throwing "null SOAP element Exception" in multi-part SOAP response

    Hi All,
    I'm using weblogic 10. My application is a webservice client generated using '*clientgen*', which is running on weblogic, and
    is invoking a remotely hosted webservice ( Remotely hoseted webservice may not be running on weblogic).
    I've the wsdl file of remotely hosted webservice.
    Now the problem is with WSDL file (I suppose), have a look at this.
    *&lt;message name="m1"&gt;*
    *&lt;part name="body" element="tns:GetCompanyInfo"/&gt;*
    *&lt;/message&gt;*
    *&lt;message name="m2"&gt;*
    *&lt;part name="body" element="tns:GetCompanyInfoResult"/&gt;*
    *&lt;part name="docs" type="xsd:AnyComplexType"/&gt; ------&gt; assume all elements inside this complex type can be nil or minOccurs set to '0'*
    *&lt;part name="logo" type="xsd:AnyOtherComplexType"/&gt; ------&gt; assume all elements inside this complex type can be nil or minOccurs set to '0'*
    *&lt;/message&gt;*
    &lt;portType name="pt1"&gt;
    &lt;operation name="GetCompanyInfo"&gt;
    &lt;input message="m1"/&gt;
    *&lt;output message="m2"/&gt; -----&gt; multi part message.*
    &lt;/operation&gt;
    &lt;/portType&gt;
    Now here is sample message for the request(I've composed this message for this question):
    &lt;soap:Envelope&gt; MESSAGE1
    &lt;soap:header/&gt;
    &lt;soap:body&gt;
    &lt;tns:m2&gt;
    &lt;tns:GetCompanyInfoResult&gt;
    Blah Blah....
    &lt;/tns:GetCompanyInfoResult&gt;
    &lt;tns:docs&gt;
    Blah Blah....
    &lt;/tns:docs&gt; Assume no data for 'logo', so it's not returned. Since all its elements can be nillable.
    &lt;tns:m2&gt;
    &lt;/soap:body&gt;
    &lt;/soap:Envelope&gt;
    First of all, is this SOAP response is valid? I'm not sure about *'message' and 'parts' in SOAP*, but according to XML schema standards it's invalid.
    Because, according to *'message' m2, 'logo' is missing*, eventhough all it's elements are nillable in such case there should be *&lt;logo/&gt;* at the end.
    I mean valid message should be like below
    &lt;soap:Envelope&gt; '*MESSAGE2*'
    &lt;soap:header/&gt;
    &lt;soap:body&gt;
    &lt;tns:m2&gt;
    &lt;tns:GetCompanyInfoResult&gt;
    Blah Blah....
    &lt;/tns:GetCompanyInfoResult&gt;
    &lt;tns:docs&gt;
    Blah Blah....
    &lt;/tns:docs&gt;
    *&lt;tns:logo/&gt; ------------------&gt; here is the change compared to above message. empty element.*
    &lt;tns:m2&gt;
    &lt;/soap:body&gt;
    &lt;/soap:Envelope&gt;
    Now the concerns are :
    (1) Which is a valid response? Message1 or Message2
    (2) If message1 is valid then why is weblogic throwing an exception 'null SOAP element', I suppose this is due to missing 'logo' element.
    (To confirm this I've used tcpmonitor and found message1 as response but weblogic is still throwing 'null SOAP Element' exception,
    which confirms it needs 'logo' as well, I suppose &lt;logo/&gt; at least). Is there any workaround for this in weblogic for multi-part messages?
    (3) If message1 is invalid according to SOAP standards then You've answered my question. ---&gt; I need to talk to the webservice provider in this case.....
    Thanks in advance...

    Message 1 is not Basic Profile 1.1 compliant. It is specified by BP1.1 in section 4.4.1(http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#Bindings_and_Parts) that when a wsdl:part element is defined using the type attribute, the serialization of that part in a message is equivalent to an implicit (XML Schema) qualification of a minOccurs attribute with the value "1", a maxOccurs attribute with the value "1" and a nillable attribute with the value "false".

Maybe you are looking for

  • Dreamweaver copy and paste not working

    Hi The copy and paste functions on my Dreamweaver have stopped working. The copy and paste functions are greyed out in the edit drop down in both code and design views. Ctr C and V are also not working. Tried various fixes including moving the config

  • User Defined Object in orchestration

    We want to use user defined object as a type for the variable in orchestration. It there any way to do it? In other word we want to return 15 attributes as orchestration response so want to creating User Defined Object. Please advice. Thanks and Rega

  • Applying Patches to WebLogic Server 9.2

    Can anyone help me out here. I have an AIX platform (5.3) and have WebLogic 9.2 installed and want to apply the latest patches. However when I try to use the bsu command it obviously wants to run up the GUI, which we do not have access to due to an X

  • Connection a iMac 10,1 to a MacBookPro4,1

    I would like to connect my MacBookPro4,1 to my iMac 10,1 as an extra monitor for using final cut...which cables do i need to use? thank you. N

  • Add discount for particular customer on delivery

    Hi, I need add discount for particular customer on delivery. Actually what i want; ABC as customer takes Goods quantity 100 pc rate 5 total=500 and VAT 15% of total =75 then gross total =575. and discount for this customer is 1.5% of base amount that