2 level schema import: cvc-complex-type.2.4.a: Invalid content was found...

HI
I'm writing an application that gathers xml documents into batches, sends these batches to translation, receives them from translation and unpacks them.
My documents are ads. I have a schema (x1.xsd) describing them. This schema imports another schema (x2.xsd). None of these are controlled by me (I need a very good reason to change them).
I have created a new schema (x.xsd) for my batches. This schma imports the ad schema (x1.xsd).
When I validate an example ad (x1.xml) using the ad schema (x1.xsd), validation is OK. This is the same for XML Spy, oracle.xml.schemavalidator.XSDValidator and org.dom4j.io.SAXReader
When I validate an example batch (x.xml) with the same ad data in the batch,
XML Spy says: Unexpected element 'AD' in element 'ADS'. Expected: AD
oracle.xml.schemavalidator.XSDValidator says: XML-24521: (Error) Element not completed: 'ADS'org.dom4j.io.SAXReader says: cvc-complex-type.2.4.a: Invalid content was found starting with element 'AD'. One of '{"x/translation":AD}' is expected.
By changing my batch xml by removing xmlns="x/ad" from the AD tag and prefix all "x/ad"-owned tags with ad:, I can make all validators validate.
But I don't see the reason for this, and thus have some problems telling the supplier that we need to change the schema and xml...
Notice that I do not have the corresponding problem in the x1.xsd / x2.xsd relationship !!??
Any suggestions will be appreciated.
/Jornsen
I enclose a copy of the files mentioned above:
x.xml:
<TRANSLATION_BATCH batchId="8" xmlns="x/translation" xmlns:ad="x/ad" xmlns:gp="x/groups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tl="x/translation" xsi:schemaLocation="x/translation
C:\tmp\t.xsd">
  <LANGUAGES anattr="monoLanguageXmlAd">
    <LANG LangId="3"/>
    <LANG LangId="4"/>
  </LANGUAGES>
  <ADS>
    <AD adattr="hest" xmlns="x/ad" xmlns:gp="x/groups" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <LANGLIST>
        <LANG LangId="17"/>
      </LANGLIST>
      <ITEMLIST>
        <ITEM xmlns="x/groups" anattr="hund">
          <ITEM_INFO name="hest"/>
        </ITEM>
      </ITEMLIST>
    </AD>
  </ADS>
</TRANSLATION_BATCH>x1.xml:
<AD adattr="hest" xmlns="x/ad" xmlns:gp="x/groups" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="x/ad C:\tmp\t1.xsd">
  <LANGLIST>
    <LANG LangId="17"/>
  </LANGLIST>
  <ITEMLIST>
    <ITEM xmlns="x/groups" anattr="hund">
      <ITEM_INFO name="hest"/>
    </ITEM>
  </ITEMLIST>
</AD>x.xsd:
<xs:schema targetNamespace="x/translation" attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns="x/translation" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tl="x/translation" xmlns:ad="x/ad">
  <xs:import namespace="x/ad" schemaLocation="t1.xsd"/>
  <xs:element name="TRANSLATION_BATCH">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="LANGUAGES">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="LANG" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="LangId" type="xs:string" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="anattr" type="xs:string"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="ADS">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AD" type="ad:ADType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="batchId" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>x1.xsd:
<xs:schema targetNamespace="x/ad" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns="x/ad"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ad="x/ad" xmlns:gp="x/groups">
  <xs:import namespace="x/groups" schemaLocation="t2.xsd"/>
  <xs:element name="AD" type="ad:ADType">
  </xs:element>
  <xs:complexType name="ADType">
    <xs:sequence>
      <xs:element name="LANGLIST" type="ad:LANGLISTType">
      </xs:element>
      <xs:element name="ITEMLIST" type="gp:ITEMLISTType">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="adattr" type="xs:string" use="optional"/>
  </xs:complexType>
  <xs:complexType name="LANGType">
    <xs:attribute name="LangId" type="xs:int" use="required"/>
  </xs:complexType>
  <xs:complexType name="LANGLISTType">
    <xs:sequence>
      <xs:element name="LANG" type="ad:LANGType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>x2.xsd:
<xs:schema xmlns="x/groups" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="x/groups"
elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:complexType name="ITEMLISTType">
    <xs:sequence>
      <xs:element name="ITEM" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ITEM_INFO" maxOccurs="unbounded">
              <xs:complexType>
                <xs:attribute name="name" type="xs:string" use="required"/>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="anattr" type="xs:string"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>Message was edited by:
Jornsen - formatting
Message was edited by:
Jornsen

Hi Linyin,
Please refer to: http://middlewaremagic.com/weblogic/?p=2034
The Problem is missing element <web-resource-name> in your "web.xml" file..... which must be a Unique name of your Resource set which u want to make secure.....
<security-constraint>
<web-resource-collection>
*<web-resource-name>MySecureResources</web-resource-name>*
<description>Some Description</description>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
Thanks
Jay SenSharma
http://middlewaremagic.com/weblogic   (Middleware Magic Is Here)

Similar Messages

  • External definition import WSDL complex type problem

    Hi,
    i have created a webservice using apache axis and created an external definition for the service. You can see the respective WSDL recognized by XI below. The service takes an array of adresses. Unfortunately, when I want to define the message mapping, theres only the array but not the address attributes. What would be a proper definition of the service?
    Cheers,
    Heiko
    ===================================================
    1. WSDL from external defintion:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost:8080/axis/services/AdressService">
         <wsdl:types>
              <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost:8080/axis/services/AdressService" targetNamespace="http://localhost:8080/axis/services/AdressService">
                   <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
                   <xsd:complexType xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="AddressDto">
                        <xsd:sequence>
                             <xsd:element name="ID" type="xsd:string" nillable="true" />
                             <xsd:element name="name" type="xsd:string" nillable="true" />
                             <xsd:element name="strasse" type="xsd:string" nillable="true" />
                             <xsd:element name="ort" type="xsd:string" nillable="true" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="ArrayOfAddressDto">
                        <xsd:complexContent>
                             <xsd:restriction base="soapenc:Array">
                                  <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="impl:AddressDto[]" />
                             </xsd:restriction>
                        </xsd:complexContent>
                   </xsd:complexType>
              </xsd:schema>
         </wsdl:types>
         <wsdl:message name="writeAddressDataResponse" />
         <wsdl:message name="writeAddressDataRequest">
              <wsdl:part xmlns:generateduniqueprefix3="http://localhost:8080/axis/services/AdressService" name="addresses" type="generateduniqueprefix3:ArrayOfAddressDto" />
         </wsdl:message>
    </wsdl:definitions>
    2. XSD extracted from WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://localhost:8080/axis/services/AdressService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost:8080/axis/services/AdressService">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:element name="addresses" type="ArrayOfAddressDto" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:complexType name="ArrayOfAddressDto" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsd:complexContent>
          <xsd:restriction base="soapenc:Array">
            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="impl:AddressDto[]" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>
    </xsd:schema>
    ??? Where are the atributes of the address here ???

    Hi Heiko,
    XI does not support the use of soapenc:array. Please refer to http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16556272 regarding the use of this construct.
    Greetings Stephan

  • JAXB - Elements declared as Complex Types becomming static inline classes

    When a complex type is defined in the XSD as a complex type, compiling the scheme creates it as static class within the owning class.
    Is there anyway to change the behavior so that a regular class is created? Or do I need to change the schema to declare the type 'at the top level'?

    When a complex type is defined in the XSD as a complex type, compiling the scheme creates it as static class within the owning class.
    Is there anyway to change the behavior so that a regular class is created? Or do I need to change the schema to declare the type 'at the top level'?

  • Problem when importing the complex bean model into webdynpro

    hi all,
    when importing the complex bean model into the webDynpro, it was returning the blank.
    Thanks in advance

    Hi,
      show your code for see and understand what could be wrong.
    Here one mine example:
    The model class
    * Created on 27-ott-2006
    * To change the template for this generated file go to
    * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package tmp.userslist.comp.model.userslist;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.sql.DataSource;
    import java.util.Collection;
    import java.util.ArrayList;
    import java.io.Serializable;
    * @author rtagliento
    * To change the template for this generated type comment go to
    * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class AllUsers {
    // implements Serializable {
         private Connection con;
         private ResultSet rs;
         private Statement stmt;
         private String SqlQuery;
         private Collection usersList = null;
         private UserElement users = null;
    //     private Collection empDetailsList=null;
    //     private EmpDetailsHelperClass  empdetails=null;
         public AllUsers(){
              con = null;     
              java.sql.ResultSet rs = null;
              rs = null;
              SqlQuery  = "SELECT * FROM TMP_USERSLIST ; ";
         public Connection getConnection (){
                   return con;
         public void setConnection (Connection c){
              con = c;
         public Collection getUsersList()
              return usersList;
         public UserElement getUsers()
              return users;
         public void setUsers(UserElement class1)
              users = class1;
         public void execute() throws Exception {
              String DEBUG = new String("");
              try {
                   stmt = con.createStatement();
                   rs = stmt.executeQuery(SqlQuery);
                   usersList = new ArrayList();
                   usersList.clear();
                   while (rs.next()){
                        users = new UserElement();
                        users.setID(rs.getString("ID"));
                        DEBUG += "ID: " + rs.getString("ID") + " | ";
                        users.setName(rs.getString("NAME"));
                        DEBUG += "NAME: " + rs.getString("NAME") + " | ";
                        users.setSurname(rs.getString("SURNAME"));
                        DEBUG += "SURNAME: " + rs.getString("SURNAME") + " | ";
                        users.setBirthDay(rs.getDate("BIRTHDAY"));
                        DEBUG += "BIRTHDAY: " + rs.getDate("BIRTHDAY").toString() + " ---------- ";
                        usersList.add(users);
                   rs.close();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   throw new Exception(e.toString() + DEBUG);
    //          throw new Exception(new Integer(usersList.size()).toString() + DEBUG);
    when use it:
         AllUsers AllU = new AllUsers();
    //     AllU.setConnection(myJdbc.getConnection());
         wdContext.nodeAllUsers().bind(AllU);
         wdContext.currentAllUsersElement().setConnection(myJdbc.getConnection());
         try {
              wdContext.currentAllUsersElement().modelObject().execute();
         } catch (Exception e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    Hope can help.
    Bye

  • In HTTP to SOAP scenario. Error i get is "Invalid content type for SOAP"

    Hi,
    In HTTP to SOAP(synch) scenario. Error i get is <b>"Invalid content type for SOAP"</b>
    When pass my data in the HTTP client, I get the following Error.
    What may be the cause,How to reslove it.
    Response am getting is below............................
    Result:  
    <SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN</SAP:AdditionalText></SAP:Error>

    hi ,
    Just refer following 2 links
    Re: Invalid content type for SOAP
    Re: invalid content type for SOAP: TEXT/HTML
    Regards,
    AshwinM
    Reward If helpful

  • Not able to import a schema in OBR which has multiple complex type

    Hi,
    Am trying to create a Decision service in Oracle Business Rules, while trying to create input and output facts i got an
    error message as mentioned below.(Schema has n no of complex type)
    "An attemp to add a schema to the schema browser failed!
    Please make sure shcemas are in the appropriate directories ."
    Please let me know, if anyone has fixed this kind of issue.

    Hi
    Did you get a solution to this issue?

  • How to create a reference instead of complex type for record in data structure type in BizTalk schema

    I have created the record in BizTalk schema but i will give to Data Structure Type as reference For eg:Recordname(Reference) instead of recordname(Complex type).
    Please help me to sort this out
     

    You can add a reference to an existing type only.
    You might have to manually edit the XSD file to change the xmlns definiton to xmlns:tns and then after you define the record type, set the datatype to tns:.... this creates the XML Type. Then later in your schema you can instantiate this with a name and
    then set type to tns:.... (Reference)
    Regards.

  • Odata function import - input as complex type

    Hello
    Is it possible to make an input as a complex type ?
    for example we want to check set of values which are in table, all for one temperature .
    and we will use structure:
    1) -temperature
        -table
              -tableval1
              -tableval2
              -tableval3
    Question is how to set such input type in segw ?
    Thanks from mountains
    Lucas

    Thank you for answer.
    The way you create this example does not reflect relation 1:n
    We know that temperature value to measured values in in relation 1:n 
    We don't know n , its could be 5 or 100.
    As i understand you approach with complex type will be good when we know that for example for every temperature there will be 5 measured values. but we don't know this. Its dynamic value from runtime, not static.
    I mixup while writing post complex type with table type. Correct valus which i want to pass are:
    - temerature
    - date
    - measured value table (n-values, dynamic from runtime)
              -  valueID1, measured value1
             - valueID2, measured value2
             - valueID3, measured value3
             - valueIDn, measured valuen
    For now i know 2 ways:
    1) concatenate values from table to one string parameter (function import apraache)
    2) create update statement with table (crud update approache):
    - temerature, date, valueID1, measured value1
    - temerature, date, valueIDn, measured valuen
    It makes redundantion.
    Both solutions are not ideal.
    Thanks for your help!

  • Parsing xml for complex type using sax

    I have an xsd of below type:
    <xs:complexType name="itemInfo">
        <xs:sequence>
          <xs:element name="displayLineNumber" type="xs:string" minOccurs="0"/>
          <xs:element name="lineNumber" type="xs:integer" minOccurs="0"/>
          <xs:element name="parentLineNumber" type="xs:integer" minOccurs="0"/>
       <xs:element name="service" type="serviceInfo" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
    </xs:complexType>
    <xs:complexType name="serviceInfo">
        <xs:sequence>
          <xs:element name="displayLineNumber" type="xs:string" minOccurs="0"/>
          <xs:element name="lineNumber" type="xs:integer" minOccurs="0"/>
          <xs:element name="serviceName" type="xs:string" minOccurs="0"/>
          <xs:element name="serviceDescription" type="xs:string" minOccurs="0"/>
          <xs:element name="subscriptionBand" type="subscriptionBandInfo" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="subscriptionBandInfo">
        <xs:sequence>
          <xs:element name="min" type="xs:long"/>
          <xs:element name="max" type="xs:long"/>
          <xs:element name="duration" type="xs:string" minOccurs="0"/>
          <xs:element name="price" type="xs:decimal"/>
        </xs:sequence>
      </xs:complexType>
    I have written a handler and able to handle simple type but how I can handle serviceInfo and subscriptionBandInfo as itemInfo is my root element.
    My handler class is:
    public class ProductHandler
      extends DefaultHandler
      //List to hold ProductInfo object
      private List<ProductInfo> productList = null;
      private ProductInfo product = null;
      public List<ProductInfo> getProductList()
        return productList;
      boolean bDisplayLineNumber = false;
      boolean bLineNumber = false;
      boolean bParentLineNumber = false;
      @Override
      public void startElement(String uri, String localName, String qName, Attributes attributes)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
        { //create a new ProductInfo and put it in Map
          //initialize ProductInfo object and set id attribute
          product = new ProductInfo();
          //initialize list
          if (productList == null)
            productList = new ArrayList<ProductInfo>();
        else if (qName.equalsIgnoreCase("name"))
          //set boolean values for fields, will be used in setting ProductInfo variables
          bName = true;
        else if (qName.equalsIgnoreCase("displayLineNumber"))
          bDisplayLineNumber = true;
        else if (qName.equalsIgnoreCase("lineNumber"))
          bLineNumber = true;
        else if (qName.equalsIgnoreCase("parentLineNumber"))
          bParentNumber = true;
      @Override
      public void endElement(String uri, String localName, String qName)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
          //add ProductInfo object to list
          productList.add(product);
      @Override
      public void characters(char ch[], int start, int length)
        throws SAXException
       if (bDisplayLineNumber)
          product.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
          bDisplayLineNumber = false;
       else if (bLineNumber)
          product.setLineNumber(Integer.parseInt(new String(ch, start, length)));
          bLineNumber = false;
        else if (bParentNumber)
          product.setParentNumber(Integer.parseInt(new String(ch, start, length)));
          bParentNumber = false;
      @Override
      public void endElement(String uri, String localName, String qName)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
          //add ProductInfo object to list
          productList.add(product);
    My ProductInfo class is:
    import com.vpc.schema.ServiceInfo;
    import java.util.ArrayList;
    import java.util.List;
    public class ProductInfo
      private String category, family, subGroup, size, productType, availability;
      private String displayLineNumber;
      private int lineNumber;
      private int parentNumber;
    private List<ServiceInfo> serviceInfo;
      public int getLineNumber()
        return lineNumber;
      public int getParentNumber()
        return parentNumber;
      public List<ServiceInfo> getServiceInfo()
        if (serviceInfo == null)
          serviceInfo = new ArrayList<ServiceInfo>();
        return serviceInfo;
      public void setServiceInfo(List<ServiceInfo> serviceInfo)
        this.serviceInfo = serviceInfo;
    I am able to do parsing for my simple type but when a complex type comes I am not able to do it. So please suggest how I can add complex type

    I suppose the posting of xsd is to show the structure of the xml...
    In any case, I can suggest a couple of things to do for the purpose.
    [1] If you still follow the same line of reasoning using some boolean like bDisplayLineNumber etc to identify the position of the parser traversing the document, you can complete the logic adding bItem (which you did not need under simplified consideration) and bService and bSubscriptionBand to identify at the parent or the grandparent in the case of the "complexType" serviceInfo and even the great-grand-parent in the case of arriving to the complexType subscriptionBandInfo...
    [1.1] With those boolean value, you determine bDisplayLineNumber etc under item directly, and then as well say bDisplayLineNumber_Service under the service etc and then bMin_SubscriptionBand etc under subscriptionBand etc. You just expand the number of those variables to trigger the setting of those fields in the object product, service in the serviceList and subscriptionBand in the subscriptionBandList etc etc.
    [1.2] All the reset of those booleans should be done in the endElement() method rather than in characters() method. That is logically more satisfactory and has a bearing in case there is a mixed content type.
    [1.3] Then when arriving at startElement of service, you make sure you initiate the serviceList, same for subscriptionBand the subscriptionList...
    [1.4] Then when arriving at endElement of service, you use setServiceInfo() setter to pass the serviceList to product and the same when arriving at endElement of serviceBand, you use setSubscriptionBand() setter to pass the subscriptionBand to service.
    ... and then basically that's is it, somewhat laborious and repetitive but the logical layout is clear. (As a side-note, you shouldn't use equalsIgnoreCase(), why should you? xml is case sensitive.)
    [2] Actually, I would suggest a much neater approach, especially when you probe many more levels of complexType. It would be even appear cleaner when you have two levels of depth already...
    [2.1] You maintain a Stack (or an implementation class of Deque, but Stack is largely sufficient here) of element name to guide the parser identifying its whereabout. By such doing, you get ride of all those bXXX's.
    This is a rewrite of the content handler using this approach and I only write the code of capturing service. Adding serviceBand is a matter of repetition of how it is done on service. And it is already clear it appears a lot neater as far as I'm concerned.
    public class ProductHandler extends DefaultHandler {
    Stack<String> tagstack=new Stack<String>();
    private List<ProductInfo> productList = null;
    private ProductInfo product = null;
    private List<ServiceInfo> serviceList=null;
    private ServiceInfo service=null;
    public List<ProductInfo> getProductList() {
      return productList;
    public List<ServiceInfo> getServiceList() {
      return serviceList;
    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) {
      if (qName.equals("item")) {
       product = new ProductInfo();
       //initialize list
       if (productList == null) {
        productList = new ArrayList<ProductInfo>();
      } else if (qName.equals("service") && tagstack.peek().equals("item")) {
       service=new ServiceInfo();
       if (serviceList==null) {
        serviceList=new ArrayList<ServiceInfo>();
      tagstack.push(qName);
    @Override
    public void endElement(String uri, String localName, String qName) {
      if (tagstack.peek().equals("item")) {
       //add ProductInfo object to list
       productList.add(product);
      } else if (tagstack.peek().equals("service") && tagstack.search("item")==2) {
       serviceList.add(service);
       product.setServiceInfo(serviceList);
      tagstack.pop();
    @Override
    public void characters(char ch[], int start, int length) throws SAXException {
      String currentName=tagstack.peek();
      int itemPos=tagstack.search("item");
      int servicePos=tagstack.search("service");
      if (currentName.equals("name") && itemPos==2)  {
       product.setName(new String(ch, start, length));
      } else if (currentName.equals("displayLineNumber") && itemPos==2) {
       product.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("lineNumber") && itemPos==2) {
       product.setLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("parentLineNumber") && itemPos==2) {
       product.setParentLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("displayLineNumber") && servicePos==2 && itemPos==3) {
       service.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("lineNumber") && servicePos==2 && itemPos==3) {
       service.setLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("serviceName") && servicePos==2 && itemPos==3) {
       service.setServiceName(new String(ch, start, length));
      } else if (currentName.equals("serviceDescription") && servicePos==2 && itemPos==3) {
       service.setServiceDescription(new String(ch, start, length));

  • Problem in calling a WS with complex type

    Hi all...
    I have to invoke a WS that has as input type a complex type defined in the wsdl...
    <complexType name="LoginInfo">
    - <sequence>
      <element name="appCode" nillable="true" type="string" />
      <element name="login" nillable="true" type="string" />
      <element name="passwd" nillable="true" type="string" />
      </sequence>
      </complexType>the soapui request looks like this:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://com.susan/SusanWS/types">
       <soapenv:Header/>
       <soapenv:Body>
          <typ:LoginWebService>
             <LoginInfo_1>
                <appCode>WEB_SERVICES</appCode>
                <login>root</login>
                <passwd>root</passwd>
             </LoginInfo_1>
          </typ:LoginWebService>
       </soapenv:Body>
    </soapenv:Envelope>in my java code I'm trying to call it with:
    Service service = new Service();
                Call call = (Call)service.createCall();
                call.setTargetEndpointAddress( new URL( wsEndpoint ) );
    //            call.setOperationName( wsMethod );
                call.setOperationName( new QName("http://com.susan/SusanWS/types",wsMethod));
                call.addParameter( "LoginInfo_1", Constants.XSD_ANYTYPE, ParameterMode.IN );
    //            call.addParameter( "appCode", Constants.XSD_STRING, ParameterMode.IN );
    //            call.addParameter( "login", Constants.XSD_STRING, ParameterMode.IN );
    //            call.addParameter( "passwd", Constants.XSD_STRING, ParameterMode.IN );
                String[] params={appCode, login, passwd};
    //            call.setReturnType( Constants.XSD_INT );
    //            Object retval = call.invoke( new String[] {appCode, login, passwd} );
                Object retval = call.invoke( new Object[] { params } );doing so..it doesn't work...the first problem I can see...is that I don't assign a parameter name to the 3 strings I pass in the param array...
    anybody has a tip to give me on how to solve this problem?

    solved...
    I imported the wsdl into Intellij idea...which created all the needed classes, interfaces,...and used service locator and endpoint binding stubs...

  • Problem with abstract complex type in substitution group.

    Hi all,
    I have three xsds, A, B, C.XSD respectively. A.xsd:There is a substitution group and its complex type declared as abstract and element that uses them. B.xsd has the same structure as A except that it has complex type derived from complex type from A. C.xsd is same as B.xsd.
    The xml files of A and B validate but not of C.
    It gives the following error:
    This file is not valid. Unexpected element'signatureString' in element author. Expected signatureString,signatureText.
    Any help at the earliest is greatly appreciated.
    the code of each xsds is as follows:
    A.XSD:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:PARTICIPATION="Participation" targetNamespace="Participation">
         <!-- ================================================= -->
         <!-- Package: Participation -->
         <!-- ================================================= -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<ST>> SignatureString -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="signatureString" type="PARTICIPATION:SignatureString" substitutionGroup="PARTICIPATION:signatureText"/>
         <xs:complexType name="SignatureString">
              <xs:complexContent>
                   <xs:extension base="PARTICIPATION:SignatureText">
                        <xs:attribute name="value" type="xs:string" use="required"/>
                   </xs:extension>
              </xs:complexContent>
         </xs:complexType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: SignatureText -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="signatureText" type="PARTICIPATION:SignatureText" abstract="true"/>
         <xs:complexType name="SignatureText" abstract="true"/>
    </xs:schema>
    B.xsd:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:CM3202="Common3202" xmlns:PARTICIPATION="Participation" targetNamespace="Common3202">
         <xs:import namespace="Participation" schemaLocation="Datatypes3203/RDT/Participation.xsd"/>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Participation>> PractitionerParticipation -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="practitionerParticipation" type="CM3202:PractitionerParticipation" abstract="true"/>
         <xs:complexType name="PractitionerParticipation" abstract="true">
              <xs:sequence>
                   <!--xs:element name="signatureText" type="PARTICIPATION:SignatureText" minOccurs="0"/-->
                   <xs:element ref="PARTICIPATION:signatureText"/>
                   </xs:sequence>
         </xs:complexType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Participation>> Author -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="author" type="CM3202:Author" substitutionGroup="CM3202:practitionerParticipation"/>
         <xs:complexType name="Author">
              <xs:complexContent>
                   <xs:extension base="CM3202:PractitionerParticipation"/>
              </xs:complexContent>
         </xs:complexType>
    </xs:schema>
    C.xsd
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:VS3203="VitalSigns3203" xmlns:CM3202="Common3202" targetNamespace="VitalSigns3203">
         <xs:import namespace="Common3202" schemaLocation="Common3202.xsd"/>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Observation>> VitalSignsObservationEvent -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="vitalSignsObservationEvent" type="VS3203:VitalSignsObservationEvent"/>
         <xs:complexType name="VitalSignsObservationEvent">
              <xs:sequence>
                   <xs:element name="author" type="CM3202:Author" minOccurs="0">
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

    Hi all,
    This seems to be a bug unless someone of you have a solution.
    Also I ma new to xml/xsd world, so could someone please give the differences between xsi:type vs substitution groups with both element and complex type being abstract. Can this scenario be accomplished by usuage of choice groups.
    Also can anyone suggest any other good xml forums.
    Please let me know.
    Thanks in advance.

  • Recommended steps to generate a web service using nested complex types

    Hello,
    I need to generate a web service that uses nested complex types with built in types on the bottom layer. I hve posted an attempt at a WSDL. Please give advice on if I am doing it correctly.
    I have the suspicion that I should nest the complex types into the final complex type VendorStockingInterface. Please confirm.
    <?xml version="1.0" encoding="utf-8"?>
    <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 targetNamespace="http://www.openuri.org/"
    xmlns:s="http://www.w3.org/2001/XMLSchema">
    <s:element name="RegisterServiceRequest">
    <s:complexType>
    <s:sequence>
    <s:element name="DeviceCapabilities">
    <s:complexType>
    <s:sequence>
    <s:element name="OSName" type="s:string" nillable="true"/>
         <s:element name="OSVersion" type="s:string" nillable="true"/>
         <s:element name="BRType" type="s:string" nillable="true"/>
         <s:element name="DisplayColors" type="s:string" nillable="true"/>
         <s:element name="DisplayTechnology" type="s:string" nillable="true"/>
         <s:element name="NetworkAccess" type="s:boolean" nillable="true"/>
         <s:element name="DownloadMethod" type="s:string" nillable="true"/>
         <s:element name="DownloadVersion" type="s:string" nillable="true"/>
         <s:element name="Protocols" type="s:string" nillable="true"/>
         </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="LicenseType">
    <s:complexType>
    <s:sequence>
         <s:element name="Licences" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="PriceValue">
    <s:complexType>
    <s:sequence>
         <s:element name="Value" type="s:float" nillable="false"/>
         <s:element name="CurrencyType" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="RevenueModelType">
    <s:complexType>
    <s:sequence>
         <s:element name="VSRP" type="RegisterServiceRequest:PriceValue" nillable="true"/>
         <s:element name="WholesalePrice" type="RegisterServiceRequest:PriceValue" nillable="true"/>
         <s:element name="VendorSplitPercentage" type="s:float" nillable="true"/>
         <s:element name="VendorPurchasePrice" type="RegisterServiceRequest:PriceValue" nillable="true"/>
         <s:element name="License" type="RegisterServiceRequest:LicenseType" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>
         <s:element name="VendorItemIdentifierType">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorProductDisplay" type="s:string" nillable="false"/>
         <s:element name="VendorProductVersion" type="s:string" nillable="false"/>
         <s:element name="VendorProductCode" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="VendorBriefType">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorID" type="s:string" nillable="false"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="VendorItemBriefType">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorProductID" type="RegisterServiceRequest:VendorItemIdentifierType" nillable="false"/>
         <s:element name="VendorID" type="RegisterServiceRequest:VendorBriefType" nillable="false"/>
         <s:element name="VendorDescription" type="s:string" nillable="true"/>
         <s:element name="VendorPricing" type="RegisterServiceRequest:RevenueModelType" nillable="false"/>
         <s:element name="DownloadURL" type="s:string" nillable="true"/>
         <s:element name="ShortCode" type="s:string" nillable="true"/>
         <s:element name="ApplicationCode" type="s:string" nillable="true"/>
         <s:element name="DRMMethod" type="s:string" nillable="true"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="ContentType">
    <s:complexType>
    <s:sequence>
         <s:element name="Categorization" type="s:string" nillable="false"/>
         <s:element name="MIMEType" type="s:string" nillable="true"/>
    </s:sequence>
    </s:complexType>
    </s:element>     
         <s:element name="VendorStockingInterface">
    <s:complexType>
    <s:sequence>
         <s:element name="VendorItemInfo" type="RegisterServiceRequest:VendorItemBriefType" nillable="false"/>
         <s:element name="ProductType" type="RegisterServiceRequest:ContentType" nillable="false"/>
         <s:element name="DeviceRequirements" type="RegisterServiceRequest:DeviceCapabilitiesType" nillable="true"/>
         <s:element name="VendorPricing" type="RegisterServiceRequest:RevenueModelType" nillable="false"/>
         <s:element name="ProgramMemory" type="s:int" nillable="true"/>
         <s:element name="DataMemory" type="s:int" nillable="true"/>
         <s:element name="Author" type="s:string" nillable="true"/>
         <s:element name="Language" type="s:string" nillable="true"/>
    </s:sequence>
    </s:complexType>
    </s:element>          
    <s:element name="RegisterServiceResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="Message" type="s:string"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </types>
    <message name="RegisterServiceSoapIn">
    <part name="parameters" element="s0:RegisterServiceRequest"/>
    </message>
    <message name="RegisterServiceSoapOut">
    <part name="parameters" element="s0:RegisterServiceResponse"/>
    </message>
    <portType name="RegisterServiceSoap">
    <operation name="RegisterService">
    <input message="s0:RegisterServiceSoapIn"/>
    <output message="s0:RegisterServiceSoapOut"/>
    </operation>
    </portType>
    <binding name="RegisterServiceSoap" type="s0:RegisterServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="RegisterService">
    <soap:operation soapAction="http://www.openuri.org/RegisterService" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="RegisterService">
    <port name="RegisterServiceSoap" binding="s0:RegisterServiceSoap">
    <soap:address location="http://localhost:7001/RegisterService.jws"/>
    </port>
    </service>
    </definitions>
    I'd like the the consumer of the web service to send it a document with the fields formatted to the VendorInterface complextype which contains the other complextypes. In return the consumer will get another document with some acknowledgement messages.
    To make this happen I'd like to generate the web service, creating the complex type classes and XMLBeans. I'd like advice on the steps to take once I get a good WSDL.
    There is also the option to go from the other direction. Is it better to attempt to create a schema XSD document instead and use that to work towards the web service and WSDL? If so, could someone give an example of how to format an XSD using my example needs.

    I think I have got it all in place, though I have not tested it as of yet. For others who are looking at this, here is my XSD file from which all my complextypes were generated and lastly here is the actual web service file.
    ?xml version="1.0"?>
    <xs:schema targetNamespace="http://openuri.org/RegisterService"
    xmlns:rs="http://openuri.org/RegisterService"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    xmlns:tns="http://temp.openuri.org/VerizonBOBO/RegisterServiceRequestDocument.xsd">
    <xs:element name="RegisterServiceRequest" type="rs:VendorStockingInterface"/>
    <xs:complexType name="DeviceCapabilitiesType">
    <xs:sequence>
    <xs:element name="OSName" type="xs:string" nillable="true"/>
    <xs:element name="OSVersion" type="xs:string" nillable="true"/>
    <xs:element name="BRType" type="xs:string" nillable="true"/>
    <xs:element name="DisplayColors" type="xs:string" nillable="true"/>
    <xs:element name="DisplayTechnology" type="xs:string" nillable="true"/>
    <xs:element name="NetworkAccess" type="xs:boolean" nillable="true"/>
    <xs:element name="DownloadMethod" type="xs:string" nillable="true"/>
    <xs:element name="DownloadVersion" type="xs:string" nillable="true"/>
    <xs:element name="Protocols" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="LicenseType">
    <xs:sequence>     
    <xs:element name="Licences" type="xs:string" nillable="false"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PriceValue">
    <xs:sequence>
    <xs:element name="Value" type="xs:float" nillable="false"/>
    <xs:element name="CurrencyType" type="xs:string" nillable="false"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RevenueModelType">
    <xs:sequence>
    <xs:element name="VSRP" type="rs:PriceValue" nillable="true"/>
    <xs:element name="WholesalePrice" type="rs:PriceValue" nillable="true"/>
    <xs:element name="VendorSplitPercentage" type="xs:float" nillable="true"/>
    <xs:element name="VendorPurchasePrice" type="rs:PriceValue" nillable="true"/>
    <xs:element name="License" type="rs:LicenseType" nillable="false"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorItemIdentifierType">
    <xs:sequence>
    <xs:element name="VendorProductDisplay" type="xs:string" nillable="false"/>
    <xs:element name="VendorProductVersion" type="xs:string" nillable="false"/>
    <xs:element name="VendorProductCode" type="xs:string" nillable="false"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorBriefType">
    <xs:sequence>
    <xs:element name="VendorID" type="xs:string" nillable="false"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorItemBriefType">
    <xs:sequence>
    <xs:element name="VendorProductID" type="rs:VendorItemIdentifierType" nillable="false"/>
    <xs:element name="VendorID" type="rs:VendorBriefType" nillable="false"/>
    <xs:element name="VendorDescription" type="xs:string" nillable="true"/>
    <xs:element name="VendorPricing" type="rs:RevenueModelType" nillable="false"/>
    <xs:element name="DownloadURL" type="xs:string" nillable="true"/>
    <xs:element name="ShortCode" type="xs:string" nillable="true"/>
    <xs:element name="ApplicationCode" type="xs:string" nillable="true"/>
    <xs:element name="DRMMethod" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ContentType">
    <xs:sequence>
    <xs:element name="Categorization" type="xs:string"/>
    <xs:element name="MIMEType" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="VendorStockingInterface">
    <xs:sequence>
    <xs:element name="VendorItemInfo" type="rs:VendorItemBriefType"/>
    <xs:element name="ProductType" type="rs:ContentType"/>
    <xs:element name="DeviceRequirements" type="rs:DeviceCapabilitiesType"/>
    <xs:element name="VendorPricing" type="rs:RevenueModelType"/>
    <xs:element name="ProgramMemory" type="xs:int"/>
    <xs:element name="DataMemory" type="xs:int"/>
    <xs:element name="Author" type="xs:string"/>
    <xs:element name="Language" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RegisterServiceResponse">
    <xs:sequence>
    <xs:element name="Message" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    The Web Service File:
    import org.openuri.registerService.RegisterServiceResponse;
    import org.openuri.registerService.RegisterServiceRequestDocument;
    import com.verizon.hp.registerservice.*;
    public class RegisterService implements com.bea.jws.WebService
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:protocol form-post="false" form-get="false"
    public org.openuri.registerService.RegisterServiceResponse RegisterService(org.openuri.registerService.RegisterServiceRequestDocument RegisterServiceDoc)
    VendorStockingInterface vsInterface = (VendorStockingInterface)RegisterServiceDoc.getRegisterServiceRequest();
    System.out.println(vsInterface.toString());
    com.verizon.hp.registerservice.RegisterServiceResponse serviceResponse = new com.verizon.hp.registerservice.RegisterServiceResponse();
    serviceResponse.setMessage("Register New Service Message has been received successfully");
    org.openuri.registerService.RegisterServiceResponse response = (org.openuri.registerService.RegisterServiceResponse)serviceResponse;
    return response;
    }

  • Data Type - Complex type

    Hi experts!
    I wonder if it's possible when creating a data type that the highest treelevel doesn't get Category "Complex Type".
    I want it to be an Element instead. Because the receiving system which is terradata can't read the message with start root Complex Type.
    The Idocs which I import into PI have the highest treelevel as Element.
    Any ideas?
    Regards

    Hi Sonny,
    I think i dint understand your query earlier but now its clear and hence the solution.
    Actually your requirement is not correct.
    By definition, A simple element is an XML element that can contain only text. It cannot contain any other elements or attributes.
    http://www.w3schools.com/schema/schema_simple.asp
    Whereas a complex element is an XML element that contains other elements and/or attribute
    http://www.w3schools.com/schema/schema_complex.asp
    And the root node of a DT in PI contains other elements so it has to be a complex type. This is the basic concept of XSD so even if you change the XSD type manually outside PI and import; the PI will give you an error while activating the DT.
    Let us know if you have any other doubts!!

  • JAXB anonymous complex types and inner interfaces

    When JAXB generates interfaces/classes for a schema with nested anonymous complex types, it nests the resultant interfaces/classes. Is there any way to force JAXB to put these nested interfaces/classes at the top level of the package instead?
    Note that if I specify a <class> binding, it changes the name of the inner interface/class, but doesn't change the fact that it's nested. It is my understanding that in JAXB Beta specifying a <class> binding for an anonymous complexType would in fact push it to the top level. Was this a bug, or is it a feature missing from 1.0, or am I misinformed about JAXB Beta?
    I realize that scope-wise it makes sense to generate nested anonymous complex types as inner classes, however it leads to highly unreadable code when dealing with deeply nested structures. I'm hoping someone knows of a way to workaround this issue without simply redefining the anonymous complex types as named complex types.
    Thanks,
    -Greg Merrill

    According to sec 4.4 "By default if xml schema component for which java content interface is to be generated is scoped within a complex type then the java content interface should appear nested within the content interface representing the complex type. ".
    So I doubt that worked with beta and you may have to represent this anonymous complex type as a named complex type to avoid the nesting.
    Regards,
    Bhakti

  • WSDL & local qualified accessors (complex type - child elements)

    Why does the WLS8.1 generated WSDL file specify
    elementFormDefault="qualified" in the schema for complex types.
    The resulting runtime SOAP bodies that are sent have unqualified child
    elements and tools like JAX-RPC, determine from the WSDL schema that these
    child elements SHOULD be qualified and fail to parse the body. I understand
    that the spec states that they should not be qualified but then why does the
    schema not specify
    elementFormDefault="unqualified"?
    I have to manually edit the WSDL (to say "unqualified") to generate a client
    using JAX-RPC.
    Is there some way I can tell <wsdlgen> task to do this?
    Thanks,
    M
    Here's the excerpt from my WLS 8.1 generated WSDL file:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tp="java:com.xxx.framework.persist"
    xmlns:stns="java:com.xxx.businessservices.indexservice.valueobjects"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.xxx.businessservices.indexservice.valueobjects">
    <xsd:import namespace="java:com.xxx.framework.persist" />
    <xsd:import namespace="java:language_builtins.util" />
    <xsd:complexType name="IndexVO">
    <xsd:complexContent>
    <xsd:extension xmlns:tp="java:com.xxx.framework.persist"
    base="tp:FW_PersistentObject">
    <xsd:sequence>
    <xsd:element type="xsd:string" name="code" minOccurs="1" nillable="true"
    maxOccurs="1" />
    <xsd:element type="xsd:string" name="description" minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:long" name="indexID" minOccurs="1" maxOccurs="1"
    />
    <xsd:element type="stns:IndexProviderVO" name="indexProviderVO"
    minOccurs="1" nillable="true" maxOccurs="1" />
    <xsd:element type="stns:IndexSourceVO" name="indexSourceVO" minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:string" name="name" minOccurs="1" nillable="true"
    maxOccurs="1" />
    <xsd:element type="xsd:dateTime" name="nextUpdateDate" minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:long" name="providerID" minOccurs="1"
    maxOccurs="1" />
    <xsd:element type="xsd:long" name="scheduleID" minOccurs="1"
    maxOccurs="1" />
    <xsd:element type="stns:UpdateScheduleVO" name="scheduleVO" minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:long" name="sourceID" minOccurs="1" maxOccurs="1"
    />
    <xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
    name="updateFrequencies" minOccurs="1" nillable="true" maxOccurs="1" />
    <xsd:element xmlns:tp="java:com.xxx.framework.persist"
    type="xsd:dateTime" name="updatesDisabledDate" minOccurs="1" nillable="true"
    maxOccurs="1" />
    <xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
    name="values" minOccurs="1" nillable="true" maxOccurs="1" />
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    "Scott Ziegler" <[email protected]> wrote in message
    news:[email protected]...
    On Mon, 21 Jul 2003 09:31:45 -0500, Mark Fine wrote:
    I've been debugging an XML-RPC generated client and came across the
    following problem:
    I have a webserice serialized Object, "IndexVO" that has an attribute
    (ie.
    element) "code".
    The WLS8.1 generated WSDL schema declares that code is in the
    "com...valueobjects" namespace by virtue of a default (target)namespace.
    At runtime, the SOAP envelope that is created seems to put the
    attribute/element "code" in the EMPTY namespace, and not in the
    "com...valueobjects" namespace. The XML-RPC generated client code is
    looking for "code" in the "com...valueobjects" namespace and skips overit
    because it is in the "", blank namespace (according to the XML parser).
    I'm not a XML expert but from what I can tell, the SOAP envelope that is
    returned does not match the WSDL file with respect to the namespace ofthe
    attributes in IndexVO.
    Am I reading this wrong?We did this for interoperability reasons. Some other stacks that we were
    trying to work with would not work if those elements were qualified. The
    problem really stems from SOAP 1.1:http://www.w3.org/TR/SOAP/#_Toc478383520
    >
    "Accessors whose names are local to their containing types have
    unqualified element names; all others have qualified names."
    SOAP stacks that are not schema aware basically require this behavior.
    You might try using a doc-literal service (which is more faithful to the
    schema) if that fits your situation.
    --Scott

    Currently there is no option to make elementFormDefault
    unqualified. I filed an enhancement CR (112776).
    Regards,
    -manoj
    http://manojc.com
    "Mark Fine" <[email protected]> wrote in message
    news:[email protected]...
    Why does the WLS8.1 generated WSDL file specify
    elementFormDefault="qualified" in the schema for complex types.
    The resulting runtime SOAP bodies that are sent have unqualified child
    elements and tools like JAX-RPC, determine from the WSDL schema that these
    child elements SHOULD be qualified and fail to parse the body. Iunderstand
    that the spec states that they should not be qualified but then why doesthe
    schema not specify
    elementFormDefault="unqualified"?
    I have to manually edit the WSDL (to say "unqualified") to generate aclient
    using JAX-RPC.
    Is there some way I can tell <wsdlgen> task to do this?
    Thanks,
    M
    Here's the excerpt from my WLS 8.1 generated WSDL file:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tp="java:com.xxx.framework.persist"
    xmlns:stns="java:com.xxx.businessservices.indexservice.valueobjects"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.xxx.businessservices.indexservice.valueobjects">
    <xsd:import namespace="java:com.xxx.framework.persist" />
    <xsd:import namespace="java:language_builtins.util" />
    <xsd:complexType name="IndexVO">
    <xsd:complexContent>
    <xsd:extension xmlns:tp="java:com.xxx.framework.persist"
    base="tp:FW_PersistentObject">
    <xsd:sequence>
    <xsd:element type="xsd:string" name="code" minOccurs="1"nillable="true"
    maxOccurs="1" />
    <xsd:element type="xsd:string" name="description" minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:long" name="indexID" minOccurs="1" maxOccurs="1"
    />
    <xsd:element type="stns:IndexProviderVO" name="indexProviderVO"
    minOccurs="1" nillable="true" maxOccurs="1" />
    <xsd:element type="stns:IndexSourceVO" name="indexSourceVO"minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:string" name="name" minOccurs="1"nillable="true"
    maxOccurs="1" />
    <xsd:element type="xsd:dateTime" name="nextUpdateDate" minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:long" name="providerID" minOccurs="1"
    maxOccurs="1" />
    <xsd:element type="xsd:long" name="scheduleID" minOccurs="1"
    maxOccurs="1" />
    <xsd:element type="stns:UpdateScheduleVO" name="scheduleVO"minOccurs="1"
    nillable="true" maxOccurs="1" />
    <xsd:element type="xsd:long" name="sourceID" minOccurs="1"maxOccurs="1"
    />
    <xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
    name="updateFrequencies" minOccurs="1" nillable="true" maxOccurs="1" />
    <xsd:element xmlns:tp="java:com.xxx.framework.persist"
    type="xsd:dateTime" name="updatesDisabledDate" minOccurs="1"nillable="true"
    maxOccurs="1" />
    <xsd:element xmlns:tp="java:language_builtins.util" type="tp:List"
    name="values" minOccurs="1" nillable="true" maxOccurs="1" />
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    "Scott Ziegler" <[email protected]> wrote in message
    news:[email protected]...
    On Mon, 21 Jul 2003 09:31:45 -0500, Mark Fine wrote:
    I've been debugging an XML-RPC generated client and came across the
    following problem:
    I have a webserice serialized Object, "IndexVO" that has an attribute
    (ie.
    element) "code".
    The WLS8.1 generated WSDL schema declares that code is in the
    "com...valueobjects" namespace by virtue of a default (target)namespace.
    At runtime, the SOAP envelope that is created seems to put the
    attribute/element "code" in the EMPTY namespace, and not in the
    "com...valueobjects" namespace. The XML-RPC generated client code is
    looking for "code" in the "com...valueobjects" namespace and skips
    over
    it
    because it is in the "", blank namespace (according to the XML
    parser).
    >>>
    I'm not a XML expert but from what I can tell, the SOAP envelope thatis
    returned does not match the WSDL file with respect to the namespace ofthe
    attributes in IndexVO.
    Am I reading this wrong?We did this for interoperability reasons. Some other stacks that we
    were
    trying to work with would not work if those elements were qualified.The
    problem really stems from SOAP 1.1:
    http://www.w3.org/TR/SOAP/#_Toc478383520
    "Accessors whose names are local to their containing types have
    unqualified element names; all others have qualified names."
    SOAP stacks that are not schema aware basically require this behavior.
    You might try using a doc-literal service (which is more faithful to the
    schema) if that fits your situation.
    --Scott

Maybe you are looking for

  • When do we reset cocd in asset accounting

    Hi Experts, I would like to know when do we use the process of reset cocd, I have checked the threads when people are trying to change Dep key settings they are doing reset cocd. so far I have not fully involved in Asset Accounting so I am getting kn

  • I can't get itunes to open on additional computer

    I have itunes loaded on one computer and just loaded on new laptop with Windows 7.  When I try to log in to itunes store on new computer, it only loads 1/2 way and then stops.  Still works fine on old computer.

  • Wireless connection to. Rhapsody

    Can I transmit Rhapsody music from my Ipad to my sound system wirelessly using my Apple TV?

  • File Manager Question, Airbrowser and others

    Hi There People I am new to the BB game and have only had my Bold for 1 month and the PB for 2 weeks. I have to say that the BB telephone support is simply fantastic, even with a newbie like me. I use the BBPB strictly for work, no games, no music, n

  • Authorization Object-MM02

    Hi, What is the authorization object to include possible lists screen in transaction codes. User was unable to list the entries in MM02 transaction code to make a selection. Regards, KIRAN