Adding Encoding in XML header without mapping

Hi Gurus,
I am stuck in a situation where in a pass through scenario, I need to add encoding type in XML header.
Below is example -
Current Situation - <?xml version="1.0"?>
Expected result -  <?xml version="1.0" encoding="UTF-8"?>
Can anybody help me in this regard? how to achieve this?
Regards
Vidhi S

Hi Vidhi
Use it in the below way in the receiver adapter.
Module name: AF_Modules/XMLAnonymizerBean
Parameter name: anonymizer.encoding
This will work. I have tested already.

Similar Messages

  • Adding EOF to XML file without using FCC

    Hello Experts,
    I have a simple File to File scenario with source and target files being XML  and simple mapping (No content conversion necessary). The issue which I face is described below:
    File is written by receiver File Adapter on the unix system, a third party Unix script tries to read the file and faces problems which they report is because the file is not ended correctly. When we try to open the files using vi editor, we also get a warning: [Last line is not complete].
    As a temporary solution the script is making sure the line is ended correctly. Can you advice me how from PI side I can make sure that the file ends properly. I was thinking to write a shell script and add it as a OS post processing command but I am not sure whether that will work and whether that is the best solution.
    Also the file name is generated dynamically using time stamps in the receiver side. Version of PI is 7.0 SP16
    Best Regards,
    Pratik

    Hi,
    When PI sends target file to file,it definely wellformed XML,anyway you are sending XML file.
    If you are nor using any mapping,,just copying file from one to other,then problem with test data,may be source data doesnot have EOF tag.
    check/test in message mapping,it gives valid xml structures in out put,then problem with your data.
    Regards,
    Raj

  • RFC- XML header item mapping

    Hello All,
    I have the folowing scenario:
    I have an RFC table that contains header and line details in the same line. for instance:
    Header Num, header text, line num, line text
    1             abc          10        d
    1             abc          20        g
    2             def          10        h
    I want to output this to an XML file with hierarchy e.g.
    <Header>
      <Num>1</Num>
      <Text>abc</Text>
      <Item>
         <num>10</num>
         <text>d</text>
      </Item>
      <Item>
         <num>20</num>
         <text>g</text>
      </Item>
    </Header>
    <Header>
      <Num>2</Num>
      <Text>def</Text>
      <Item>
         <num>10</num>
         <text>h</text>
      </Item>
    </Header>
    I tries using splitbyvalue on valuechange but this doesn't work. How exactly is the mapping for this?
    Thanks,
    Yoni

    Hi,
    Just try this:
    <RFCLine>---splitbyvalue<Num>
    <RFCLine>---splitbyvalue<Text>
    detail
    <RFCLine)-splitbyValue-removecontext---<num>
    <RFCLine)-splitbyValue-removecontext---<text>
    Regards
    vijaya

  • Adding additional XML Header in Target XML structure

    Hi all,
    I have a requirement that i need add one additional XML header to target XML messages. At the moment i can see default XML header as ,
    <?xml version="1.0" encoding="UTF-8" ?>
    <Test>
    <Add>Test Mesage</Add>
    </Test>
    But i would like to have one more additional header like below,
    <?xml version="1.0" encoding="UTF-8" ?>
    <?Siebel-Property-Set EscapeNames="false"?>
    <Test>
    <Add>Test Mesage</Add>
    </Test>
    Can some one help me to find a way to adding this additional header?
    Thanks in advance.
    Prasad Babu.

    Hi Prasad,
    Yes it is possible by Java Mapping. Please check my response for similar thread
    Re: Add XML header?

  • File adapter - change of encoding in the header of the xml message

    Hello!
    I would like to change the encoding in the header of an xml message (sent to a a receiver file adapter)
    from <?xml version="1.0" encoding="UTF-8" ?>
    to <?xml version="1.0" encoding="ISO-8859-1" ?>
    We have XI 3.0 with SP15.
    Can anybody help me please?
    Kind regards
    Chris

    Hi Chris,
    An XSLT map can convert the encoding for you. 
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method='xml' encoding="ISO-8859-1"/>
      <xsl:template match="@*|node()">
        <xsl:copy>
          <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
      </xsl:template>
    </xsl:stylesheet>
    Thanks,
    -Russ

  • XML message without encoding type

    Hi,
    Is there any possibility to generate the XML file without encoding?
    Should convert  <?xml version="1.0"; encoding="UTF-8"?> to <?xml version="1.0";?>. I have checked the blog and the answer was either Java mapping or XSLT mapping. Is it possible to handle in graphical mapping?
    I am using the AS2 adapter to send the file to customer and External defination for the target message. Below are few information on the AS2 configuration:
    Signing Algorithm: SHA-1
    Encryption: 3DES
    Your suggestion is highly appreciated.
    Regards,
    Vasantha

    HI Vasantha,
        It is not possible with Graphical Mapping you need to go either with JAVA or XSLT mapping.
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Cheers!!!
    Naveen

  • Encoding missing from XML header

    I have to manipulate an XML document. Using Java 1.4.1, I build a Document object based on the XML file, manipulate the Document and output it as attached below.
    The problem is that the xml header in the output does not contain the "encoding" information. I could of course manipulate the output afterwards, but it would not be a neat solution. Any ideas?
    DOMSource domSource = new DOMSource(document);
      StreamResult streamResult = new StreamResult(
           new OutputStreamWriter(System.out , java.nio.charset.Charset.forName("UTF-8"))
      TransformerFactory tf = TransformerFactory.newInstance();
      Transformer serializer = tf.newTransformer();
      serializer.transform(domSource, streamResult);

    When you serialize your output to a Writer, the parser has no way to tell what encoding the Writer uses, so it's up to you to ensure that the parser knows what encoding the Writer is using. Otherwise it will not specify any encoding, essentially assuming the Writer is using either UTF-8 or UTF-16 encodings.
    In your case you don't have a problem, because "no encoding" means that the document is encoded in UTF-8 or UTF-16; it's easy for a parser to examine the first few bytes of the file and tell which it is. Yours is encoded in UTF-8, so it's correct.

  • [svn:fx-trunk] 13383: Modify to include the xml header (with encoding) in the DITA xml files.

    Revision: 13383
    Revision: 13383
    Author:   [email protected]
    Date:     2010-01-08 12:04:00 -0800 (Fri, 08 Jan 2010)
    Log Message:
    Modify to include the xml header (with encoding) in the DITA xml files.
    QE notes: None.
    Doc notes: None
    Reviewed By: Pete
    Tests run: checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va

    Thats good news.

  • XML Validation: ignore non-XML-Header in XML-file(payload): any solutions?

    Dear Experts,
    after I finally managed to configure the XML Validation, we're facing the next problem:
    The payload of the XML files looks like that:
    Abcdef#ABCDEF
    AbcDef#123
    <?xml version="1.0" encoding="UTF-8"?><Document xmlns.....
    as you can see, there's a header which is necessary. The XML Validation works fine if the header is removed manually for testing. If the header is not removed, the validation is not possible ("Content is not allowed in prolog.")
    Is it possible to realise the validation WITH that header? Can I tell SAP PI to ignore the header? Or make any changes to the XSD file?
    Thanks alot!

    Hi Armin,
    Armin Kern wrote:
    > After leaving SAP PI, those 2 lines have to be in that exact place (before the XML part) for further processing. Just deleting it wouldn't be enought. Does the complex design you mentioned complay with this requirement?
    You can put it into the message instead of deleting. And rebuild the "header" in the second step. So you can fullfill the requirement. As mentioned before: The design is complex, this will lead later on to problems. Any change will be difficult, as another developer had to read a long documentation.
    An alternative would be to do all with one interface mapping (without validation):
    1. ABAP / Java mapping deleting the "header" (put it to memory)
    2. Messges Mapping 1:1 each field (will fail in case of wrong format and act as validator)
    3. ABAP / Java mapping restoring the header
    4. Alert will be raised in case of an error (to get the result of the validation)
    Armin Kern wrote:
    > I also thought about splitting the message, deleting those 2 rows in one of the messages, sending this one message to PI again, validate it and if it is correct, send the second message (without mapping) to the final destination. No idea if that is possible at all..
    As well possible. You would need a virtual receiver for the first message, which is sending back a response. For example a servlett, a proxy or a RFC module. In that design you put some logic to the sender, what is actually not bad. But if you do so, why you dont validate there as well (for example with Java)? It would make your design much easier..
    Regards,
    Udo

  • Create a new line in the xml-header structure.

    Hi,
    Can any one tell me how to create a new line in the xml-header structure.
    I am doing a IDOC-XI-HTTP scenario.
    Actually my mapping create this file:
    <b><?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1"> </b>
    The result must look like this.
    <b><?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1"> </b>
    Thanks and Regards,
    Eren

    Hi,
    thanks for you quick answer.
    I found a xsl script.
    It works fine.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="yes"/>
       <xsl:template match="*">
          <xsl:param name="depth">0</xsl:param>
          <!-- New line with indenting. -->
          <xsl:if test="$depth > 0">
             <xsl:text>    </xsl:text>
          </xsl:if>
          <xsl:text>&#xA;</xsl:text>
          <xsl:element name="{name(.)}">
             <xsl:for-each select="@*">
                <xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
             </xsl:for-each>
             <xsl:apply-templates>
                <xsl:with-param name="depth" select="$depth + 1"/>
             </xsl:apply-templates>
          </xsl:element>
       </xsl:template>
    </xsl:stylesheet>
    Best regards
    Eren

  • Remove XML Header

    I am developing a Java Servlet and would like to query the database multiple times. I have used OracleXMLQuery and an array to be able to run three separate queries. My problem is occuring in my returned XML Document. Each query comes back with a XML Header such as:
    <?xml version = '1.0'?>
    <Query_1>
    <COL1>10</COL1>
    </Query_1>
    <?xml version = '1.0'?>
    <Query_2>
    <COL1>20</COL1>
    </Query_2>
    <?xml version = '1.0'?>
    <Query_3>
    <COL1>30</COL1>
    </Query_3>
    I have assigned the header separately and would just like to be able to turn off the generated header. My problem is coming when I am trying to use an applet and it does not like when it sees the XML header more than once. Any ideas or hints on how this can be done I would appreciate it.

    Hello this did solve my issue. I have same issue infact. I used this xsl mapping  as
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
    </xsl:stylesheet>
    But my output xml struıcture has broken. Should I  do some changing in my xsl mapping and how ?
    Regards,
    Ceren.

  • Structure with min!=max without mapping

    Hi,
    At Message Mapping - Test Tab, we have the following error:
    "Mapping object  incomplete. Unable to continue execution
    Structure with min!=max without mapping"
    We did added some custom segments to the standard idoc, but we already validate the xml structure and it seems valid.
    Do you guys know what it means?
    Thanks in advance,
    Luí

    Hi,
    If you don't map a mandatory target field, red bulb is shown in graphical mapping.Altough it saves "successfully", it fails while testing using the Test Tool and throws an error mapping incomplete Unable to continue execution. So try debugging for the unmapped target field .
    BR.Venkat

  • Read XML data without name spaces from PL/SQL

    Hi,
    I am trying to upload XML data without namespaces into Oracle tables from PL/SQL. Below is the sample XML data.
    Please let me know,How this is achievable in PL/SQL?
    <?xml version="1.0" ?>
    <insplist ver="2" count="1">
    <insp id="219991" timestamp="134817078" stat="G" operator_id="999999" >
    <data name="TIME CLOCK - PUNCH" val="INNER" type="STRING" />
    </insp>
    </insplist>
    Thanks

    And it's even simpler with the GET method as we just have to pass the url :
    SQL> DECLARE
      2 
      3    v_url      varchar2(200) := 'http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=';
      4    v_address  varchar2(200) := '1 rue Victor Hugo Paris France';
      5 
      6    v_req      utl_http.req;
      7    v_rsp      utl_http.resp;
      8 
      9 
    10 
    11    v_xml      varchar2(32767);
    12 
    13    v_lng      number;
    14    v_lat      number;
    15 
    16  BEGIN
    17 
    18    v_req := utl_http.begin_request(v_url || utl_url.escape(v_address), 'GET', utl_http.HTTP_VERSION_1_1);
    19    v_rsp := utl_http.get_response(v_req);
    20 
    21    utl_http.read_text(v_rsp, v_xml);
    22    utl_http.end_response(v_rsp);
    23 
    24    select longitude, latitude
    25    into v_lng, v_lat
    26    from xmltable(
    27         '/GeocodeResponse/result/geometry/location'
    28         passing xmlparse(document v_xml)
    29         columns longitude number path 'lng'
    30               , latitude  number path 'lat'
    31         )
    32    ;
    33 
    34    dbms_output.put_line('Longitude = ' || v_lng);
    35    dbms_output.put_line('Latitude = ' || v_lat);
    36 
    37  END;
    38  /
    Longitude = 2.2734472
    Latitude = 48.8282741
    PL/SQL procedure successfully completed
    Or, taking shorcuts :
    SQL> select *
      2  from xmltable(
      3       '/GeocodeResponse/result/geometry/location'
      4       passing httpuritype('http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address='
      5                           || utl_url.escape('1 rue Victor Hugo Paris France')
      6                           ).getxml()
      7       columns longitude number path 'lng'
      8             , latitude  number path 'lat'
      9       )
    10  ;
    LONGITUDE   LATITUDE
    2,2734472 48,8282741

  • Error deserializing arguments, xml tag without a recognized type

    I am trying to run a webservice created using Weblogic Workshop 8.1sp2 that communicates
    with an ejb control. When I test in debug mode, I get the above error, specifically:
    <detail>
    <jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
    com.bea.wlw.runtime.core.request.RequestValidationException: Error deserializing
    arguments.
    Encountered an xml tag without a recognized type: the type must be declared with
    an xsi:type attribute.
    Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered an xml tag with
    out a recognized type: the type must be declared with an xsi:type attribute.
    </detail>
    I am passing a Request object to the jws method (to the ejb) that has a Collection
    as an instance member. This Collection references objects of another type, Param
    (code for both objects below). Before passing the object, I convert the Collection
    to an array of objects. When I call the operation via a java client, I get the
    above message.
    In Workshop, I've included the Request and Param classes as the parameter xml
    and the soap style is rpc. I've tested the ejb by itself and it is working fine.
    Request.java:
    import java.util.*;
    public class Request implements java.io.Serializable
    protected Collection params=null;
    public Collection getParams()
    { return params; }
    public void setParams(Collection data)
    { params=data; }
    Param.java:
    public class Param implements java.io.Serializable
    private String name=null;
    private Object value=null;
    public String getName()
    { return name; }
    public void setName(String data)
    { name = data; }
    public Object getValue()
    { return value; }
    public void setValue(Object data)
    { value=data; }
    Here's the code from the jws:
    public class MyWS implements com.bea.jws.WebService
    * @common:control
    private control.PSEjbControl psEJB;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:parameter-xml
    * include-java-types="mypackage.Request mypackage.Param"
    * @jws:protocol soap-style="rpc"
    public void addData(mypackage.Request arg0) throws java.rmi.RemoteException
    System.out.println("arg0 : " + arg0);
    psEJB.addData(arg0);
    *Note: in the server console, arg0 comes through as null when called from my client.
    Here's the bit from my client:
    import weblogic.jws.proxies.*;
    import org.openuri.www.encodedTypes.Request;
    import org.openuri.www.encodedTypes.Param;
    public void go(String wsdl) throws Exception {
    MyWSSoap mw = null;
    mw = new MyWS_Impl().getMyWSSoap();
    Request req = new Request();
    Collection reqColl = new ArrayList();
    Param param1 = new Param();
    param1.setName("NAME");
    param1.setValue("Joe Tester");
    Param param2 = new Param();
    param2.setName("ADDRESS");
    param2.setValue("345 Test Drive");
    reqColl.add(param1);
    reqColl.add(param2);
    Object[] obs = reqColl.toArray();
    req.setParams(obs);
    mw.addData(req);
    Not sure if this enough to go by. Please let me know if you need more information.
    Any help is really appreciated. Thanks.

    Hi Keith,
    My only suggestion is to factor out the java.util.Collection (see the
    docs here [1]) with either primitive types or XMLBeans [2].
    Sorry, not much help. You might also ask your question in the workshop
    [3] newsgroup.
    Bruce
    [1]
    http://e-docs.bea.com/workshop/docs81/doc/en/integration/reference/refJavaClassConversion.html
    [2]
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/xmlbeans/conXMLBeansSupportBuiltInSchemaTypes.html
    [3]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.workshop
    Keith wrote:
    >
    Hi Bruce, thanks for the reply. I set the operation for document-style soap and
    still get the deserialization exception as mentioned in my original note. Below
    is the wsdl. Note: in my original note, the problematic operation was addData()
    which is now named addBusinessLocation(). As always, your help is greatly appreciated.
    Keith
    <?xml version="1.0" encoding="utf-8"?>
    <!-- @editor-info:link autogen="true" source="PublicServiceWS.jws" -->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
    xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    targetNamespace="http://www.openuri.org/">
    <types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/"
    xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:ope="http://www.openuri.org/">
    <s:element name="addBusinessLocation">
    <s:complexType>
    <s:sequence>
    <s:element name="arg0" type="ope:Request" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="addBusinessLocationResponse">
    <s:complexType>
    <s:sequence/>
    </s:complexType>
    </s:element>
    <s:element name="getBusinessLocation">
    <s:complexType>
    <s:sequence/>
    </s:complexType>
    </s:element>
    <s:element name="getBusinessLocationResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="getBusinessLocationResult" type="ope:Response" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="Response" nillable="true" type="ope:Response"/>
    <s:element name="repeat">
    <s:complexType>
    <s:sequence>
    <s:element name="in" type="s:string" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="repeatResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="repeatResult" type="s:string" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="string" nillable="true" type="s:string"/>
    <s:complexType name="Request">
    <s:sequence>
    <s:element name="Params" type="ope:Collection" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    <s:complexType name="Collection">
    <s:sequence>
    <s:element name="item" type="s:anyType" nillable="true" minOccurs="0"
    maxOccurs="unbounded"/>
    </s:sequence>
    </s:complexType>
    <s:complexType name="Param">
    <s:sequence>
    <s:element name="Name" type="s:string" minOccurs="0"/>
    <s:element name="Value" type="s:anyType" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    <s:complexType name="Response">
    <s:complexContent>
    <s:extension base="ope:Request">
    <s:sequence/>
    </s:extension>
    </s:complexContent>
    </s:complexType>
    </s:schema>
    </types>
    <message name="addBusinessLocationSoapIn">
    <part name="parameters" element="s0:addBusinessLocation"/>
    </message>
    <message name="addBusinessLocationSoapOut">
    <part name="parameters" element="s0:addBusinessLocationResponse"/>
    </message>
    <message name="getBusinessLocationSoapIn">
    <part name="parameters" element="s0:getBusinessLocation"/>
    </message>
    <message name="getBusinessLocationSoapOut">
    <part name="parameters" element="s0:getBusinessLocationResponse"/>
    </message>
    <message name="repeatSoapIn">
    <part name="parameters" element="s0:repeat"/>
    </message>
    <message name="repeatSoapOut">
    <part name="parameters" element="s0:repeatResponse"/>
    </message>
    <message name="getBusinessLocationHttpGetIn"/>
    <message name="getBusinessLocationHttpGetOut">
    <part name="Body" element="s0:Response"/>
    </message>
    <message name="repeatHttpGetIn">
    <part name="in" type="s:string"/>
    </message>
    <message name="repeatHttpGetOut">
    <part name="Body" element="s0:string"/>
    </message>
    <message name="getBusinessLocationHttpPostIn"/>
    <message name="getBusinessLocationHttpPostOut">
    <part name="Body" element="s0:Response"/>
    </message>
    <message name="repeatHttpPostIn">
    <part name="in" type="s:string"/>
    </message>
    <message name="repeatHttpPostOut">
    <part name="Body" element="s0:string"/>
    </message>
    <portType name="PublicServiceWSSoap">
    <operation name="addBusinessLocation">
    <input message="s0:addBusinessLocationSoapIn"/>
    <output message="s0:addBusinessLocationSoapOut"/>
    </operation>
    <operation name="getBusinessLocation">
    <input message="s0:getBusinessLocationSoapIn"/>
    <output message="s0:getBusinessLocationSoapOut"/>
    </operation>
    <operation name="repeat">
    <input message="s0:repeatSoapIn"/>
    <output message="s0:repeatSoapOut"/>
    </operation>
    </portType>
    <portType name="PublicServiceWSHttpGet">
    <operation name="getBusinessLocation">
    <input message="s0:getBusinessLocationHttpGetIn"/>
    <output message="s0:getBusinessLocationHttpGetOut"/>
    </operation>
    <operation name="repeat">
    <input message="s0:repeatHttpGetIn"/>
    <output message="s0:repeatHttpGetOut"/>
    </operation>
    </portType>
    <portType name="PublicServiceWSHttpPost">
    <operation name="getBusinessLocation">
    <input message="s0:getBusinessLocationHttpPostIn"/>
    <output message="s0:getBusinessLocationHttpPostOut"/>
    </operation>
    <operation name="repeat">
    <input message="s0:repeatHttpPostIn"/>
    <output message="s0:repeatHttpPostOut"/>
    </operation>
    </portType>
    <binding name="PublicServiceWSSoap" type="s0:PublicServiceWSSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="addBusinessLocation">
    <soap:operation soapAction="http://www.openuri.org/addBusinessLocation"
    style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    <operation name="getBusinessLocation">
    <soap:operation soapAction="http://www.openuri.org/getBusinessLocation"
    style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    <operation name="repeat">
    <soap:operation soapAction="http://www.openuri.org/repeat" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <binding name="PublicServiceWSHttpGet" type="s0:PublicServiceWSHttpGet">
    <http:binding verb="GET"/>
    <operation name="getBusinessLocation">
    <http:operation location="/getBusinessLocation"/>
    <input>
    <http:urlEncoded/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    <operation name="repeat">
    <http:operation location="/repeat"/>
    <input>
    <http:urlEncoded/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    </binding>
    <binding name="PublicServiceWSHttpPost" type="s0:PublicServiceWSHttpPost">
    <http:binding verb="POST"/>
    <operation name="getBusinessLocation">
    <http:operation location="/getBusinessLocation"/>
    <input>
    <mime:content type="application/x-www-form-urlencoded"/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    <operation name="repeat">
    <http:operation location="/repeat"/>
    <input>
    <mime:content type="application/x-www-form-urlencoded"/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    </binding>
    <service name="PublicServiceWS">
    <port name="PublicServiceWSSoap" binding="s0:PublicServiceWSSoap">
    <soap:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
    </port>
    <port name="PublicServiceWSHttpGet" binding="s0:PublicServiceWSHttpGet">
    <http:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
    </port>
    <port name="PublicServiceWSHttpPost" binding="s0:PublicServiceWSHttpPost">
    <http:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
    </port>
    </service>
    </definitions>
    Bruce Stephens <[email protected]> wrote:
    Hi Keith,
    As a quick test, you might try changing the protocol style to use
    doc/lit (@jws:protocol soap-style="document") to see if this provides
    another view on the real issue.
    Could you post the generated WSDL?
    Thanks,
    Bruce
    Keith wrote:
    I am trying to run a webservice created using Weblogic Workshop 8.1sp2that communicates
    with an ejb control. When I test in debug mode, I get the above error,specifically:
    <detail>
    <jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
    com.bea.wlw.runtime.core.request.RequestValidationException: Errordeserializing
    arguments.
    Encountered an xml tag without a recognized type: the type must bedeclared with
    an xsi:type attribute.
    Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered anxml tag with
    out a recognized type: the type must be declared with an xsi:type attribute.
    </detail>
    I am passing a Request object to the jws method (to the ejb) that hasa Collection
    as an instance member. This Collection references objects of anothertype, Param
    (code for both objects below). Before passing the object, I convertthe Collection
    to an array of objects. When I call the operation via a java client,I get the
    above message.
    In Workshop, I've included the Request and Param classes as the parameterxml
    and the soap style is rpc. I've tested the ejb by itself and it isworking fine.
    Request.java:
    import java.util.*;
    public class Request implements java.io.Serializable
    protected Collection params=null;
    public Collection getParams()
    { return params; }
    public void setParams(Collection data)
    { params=data; }
    Param.java:
    public class Param implements java.io.Serializable
    private String name=null;
    private Object value=null;
    public String getName()
    { return name; }
    public void setName(String data)
    { name = data; }
    public Object getValue()
    { return value; }
    public void setValue(Object data)
    { value=data; }
    Here's the code from the jws:
    public class MyWS implements com.bea.jws.WebService
    * @common:control
    private control.PSEjbControl psEJB;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:parameter-xml
    * include-java-types="mypackage.Request mypackage.Param"
    * @jws:protocol soap-style="rpc"
    public void addData(mypackage.Request arg0) throws java.rmi.RemoteException
    System.out.println("arg0 : " + arg0);
    psEJB.addData(arg0);
    *Note: in the server console, arg0 comes through as null when calledfrom my client.
    Here's the bit from my client:
    import weblogic.jws.proxies.*;
    import org.openuri.www.encodedTypes.Request;
    import org.openuri.www.encodedTypes.Param;
    public void go(String wsdl) throws Exception {
    MyWSSoap mw = null;
    mw = new MyWS_Impl().getMyWSSoap();
    Request req = new Request();
    Collection reqColl = new ArrayList();
    Param param1 = new Param();
    param1.setName("NAME");
    param1.setValue("Joe Tester");
    Param param2 = new Param();
    param2.setName("ADDRESS");
    param2.setValue("345 Test Drive");
    reqColl.add(param1);
    reqColl.add(param2);
    Object[] obs = reqColl.toArray();
    req.setParams(obs);
    mw.addData(req);
    Not sure if this enough to go by. Please let me know if you need moreinformation.
    Any help is really appreciated. Thanks.

  • XML header for WebServices (SOAP)

    Hi all!
    I have quite strange problem about XML header in SOAP message for WS. Usually I don't care about XML header in SOAP message, because so far I had no problems calling load of WS on different servers. Stnadard XML header that comes out looks like this (1.0 and UTF-8 are in single quotes): <?xml version='1.0' encoding='UTF-8'?>.
    But this time, the webserver I'm trying to call accepts only double quotes, e.g. like this: <?xml version="1.0' encoding="UTF-8"?>, it doesn't understand single quotes at all and there is no way of changing it!
    JDeveloper uses apache soap for standard and makes single quotes. I tried raw http call by wrapping all text into post method -> that works, so webservice is working.
    I can't set anything except endpoint, parameters, method :(
    How can I make call that uses double quotes?
    Pseudo logic is like this:
    Vector params = new Vector();
    params.addElement(xxxx);
    Call call=new Call("xxx", "xxx", params, xxx, Constants.NS_URI_SOAP_ENC);
    Response response = call.invoke(endpointURL, "xxx");

    Hacked Oracle (apache) classes and put right values in it.
    It was hard coded string, who on earth could thought that :D

Maybe you are looking for

  • PAYEXT - PEXR2002 Idoc

    I am generating the Idoc through F110. Few of the mandatory segments from the bank prospective are not populated. These are : E2IDT02 / E2EDKA1003 (Ordering Party)  and EXTPAYM field of segment E2IDKU3002 Any idea what data should be maintained and w

  • Differentiate between print and print preview event trigger for sapscript

    Hi guys, For sapscript, is there a way to know if the user presses the print or the print preview button? I need a way to determine if it is a print or print preview event triggering. I've checked the OPEN_FORM fm but found nothing useful. Please hel

  • Debug/Trace at individual Composite Level

    Hello All, Morning , need some inputs regards this question. --we are getting the errors mentioned here (ORA-29261 bad argument , ORA-06512 at SYS.UTL_HTTP) while calling the composite (which is a bpel process) deployed on 11.1.1.4 Soa Suite. ---From

  • Rc.conf and modules

    Hello gentlemen, I recently re-installed Arch on my PC and noticed that the modules section in rc.conf is empty. My previous Arch installation rendered several modules that were automatically loaded which was reflected in the modules section. Did I m

  • I library and external drive

    I think i am nearing the end of my problems. I have rebuilt my iphoto library and seems to working fine except for a few blank photo's, which I don't understand. I presume I will have to rebuild my ilibrary in my external HD, which i intent to do. I