Parseing wsdl for elements of types

Hi,
I am using org.apache.axis.wsdl.symbolTable.gen.Parser.
For some reason I am unable to get at the elements
in the <types> section of the wsdl.
Here is a basic set of calls I am using.
Parser p = new Parser();
p.run("afile.wsdl");
SymbolTable s = p.getSymbolTable();
QName qn = new QName("{a uri}nameOftheElement");
Element e = s.getElement(qn);
Node n = e.getNode();
n is null and nameOftheElement is a complex type
with children.
What am I missing?
Mike

Hi,
Part of the answer lies in the
org.apache.axis.wsdl.symbolTable.SchemaUtils class.
Mike

Similar Messages

  • 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));

  • How to generate wsdl for complex type using wscompile?

    Hi
    Since couple of days I am trying to generate the the wsdl for following classes
    abstract class Key implements serializable{
    class sikeKey extends Key{
    int siteKey;
    class AddressKey extends siteKey{
    int addressId;
    class Model{
    AddressKey key = new AddressKey();
    }I am using following ant script for wscompile
          <wscompile
              fork= "true"
              base="${dest.dir}/war/WEB-INF/classes"
              server="true"   
              features="wsi"
              mapping="${dest.dir}/war/WEB-INF/Address_Mapping.xml"
              sourceBase="${war.dir}/WEB-INF/classes"
              optimize="false"
              debug="true"
              keep="false"
              verbose="true"
              xPrintStackTrace="true"
              config="${acws-config-dir}/Address_Config.xml">
              <classpath>
                            <pathelement path="${acws.classpath}"/>
                            <pathelement path="${war.dir}/WEB-INF/classes"/>
                   </classpath>
          </wscompile>
    <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
        <classpath path="${acws.classpath}"/>
    </taskdef>It generates the wsdl but without all complex type.
    <complexType name="AddressWebServiceModel">
    <sequence>
    <element name="addKey" type="tns:AddressKey" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="AddressKey">
    <sequence>
    <element name="siteID" type="string" nillable="true"/>
    <element name="addressID" type="int"/>
    </sequence>
    </complexType>Here it should create the right mapping for classes siteKey so that the webservice call can be mapped with the response of this Model.
    Any one know how to configure the above script for proper mapping of complex type?

    Add the concrete subclasses of Key in an <AddtionalType> element in your config.xm. file.

  • I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    This is most probably because the Periodicity input value has been configured as "Required" and no value has been input for it.
    Please enter a value and try to re-run Quick Pay.

  • Creating new logical ports for WSDL with several port types not working

    Hi all,
    I am trying to integrate some BODS webservice into the BPM. I am using CE 7.2 Kernel Version:     7.20.3710. When I am trying to assign a provider system in the application configuration I get following error:
    The provider system successfully found the needed service, but its wsdl is without webservice policy. Thus the generated client configuration might not work because of different configurations between service and client (most probable a difference in the security settings). Either assign a provider system with access to wsdl with policy or manually create the client configuration.
    The regarding provider system is using a communication profil where the authentication method is set to "none". Normally this configuration should work, but it isn't.
    So I started to create new logical ports for each port type. But then I get the error:
    Port type name of loaded WSDL does not match the port type name of the Service Reference.
    I checked already the port type names in the WSDL but they are 100% the same. What I found was that the configuration is always trying to use the first port type in the WSDL. So I am not able to configure the other port types in the service group.
    I also tried to do the same thing using a WSDL with just one port type and surprise it is working...
    I hope somebody can help me out
    Thanks in advance
    Andy

    Hi Andy,
    Please check this Link: https://cw.sdn.sap.com/cw/docs/DOC-45012
    Regards,
    Naresh B

  • Unknown type TABLE for element Error

    This question i am posting on behalf of one of my friend
    In RF transaction, created a screen that contains table control. The table control has created using wizard
    If we run the transaction with in SAPGui its working fine. After creating Internet service, and publish  and run thru internet explorer its giving the following said Error
    " Unknow type TABLE for element IT_PRODUCT"
    I checked the controls statement for table view , its there in the code Here IT_PRODUCT is tableview for tablecontrol
    Any Info ?

    Solved.
    The problem is because , the table control had been created thru "Table Control Wizard" , solved by creating the table control using SE51 has resolved the issue.
    Strange ?
    May be because wizard unncessary creating lot of HTML code while publishing

  • APIs for parsing WSDL

    Hi
    Does 'Java technologies for Web services" have APIs for parsing WSDL files? Are there any open source implementations for parsing WSDL files.
    Thanks
    Pradeep

    At present there is a JSR in the middle of being reviewed which is an API to handle WSDL files. JSR 110 gives all the important details. It will hopefully be release soon. What you could do is because WSDL is a xml-compliant you can produce your own xml parser specific to WSDL using JAXP.
    HTH

  • Want to change the cost element for a activity type (KP26)

    Hi,
    I want to change the Allocation cost element for an activity type in KP26. I have already changed the cost element in the activity master data in KL02. Now i want to change it in KP26. I am trying to delete the existing line item in KP26  to create the new line item with the new cost element, but system not allowing to delete the existing one. It throws the error message ""Allocations with XXXXXXX/XXXX (Cost center/Activity type)  exist ; deletion not possible". Can someone please help me to change the cost element?
    Regards
    Dev

    Hi Rao and Lalit,
    Thanx for you people for helping me. i havin gone doubt here. If i am deleting the existing line in KP26 and create new line with appropriage cost element will it be cause the existing datas? I don't want to go for another activity type, because our process is a complex process exist all over the world in more than 300 company codes. So i want to use the existing activity type but want to change the allocation cost element alone. Is there any possibility to change the cost element alone?
    Regards,
    Dev

  • Stub/Client Generation of WSDL for Windows Communication Foundation Service

    Hii,
    I am building a client for the WCF service using Soap1.2 and ws-security. I have tried building a stub for the service using JDeveloper 10 g and also tried to validate the wsdl using XML spy. Both are giving errors. I wanna know how could i genrate the stub for the service and also Validate WSDL? I know i might have to modify the WSDL, but dont know what changes must be required? And Also which std i must adhere?
    Here is the WSDL
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
                      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                      xmlns:wsap10="http://www.w3.org/2005/08/addressing"
                      xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
                      xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
                      xmlns:i0="http://Corona.Services.UserMgmt.UserMgmtSrv"
                      xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/09/policy/addressing"
                      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                      xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
                      xmlns:tns="http://tempuri.org/"
                      xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
                      xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
                      xmlns:wsa10="http://www.w3.org/2005/08/addressing"
                      targetNamespace="http://tempuri.org/" name="UserMgmtSrv">
      <wsdl:import namespace="http://Corona.Services.UserMgmt.UserMgmtSrv"
                   location="http://debugger/Corona.Services/Corona.Services.svc?wsdl"/>
      <wsdl:types/>
      <wsdl:binding name="WSHttpBinding_UserMgmtSrv" type="i0:UserMgmtSrv">
        <wsp:PolicyReference URI="#WSHttpBinding_UserMgmtSrv_policy"/>
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="Authenticate">
          <wsdl:input>
            <soap12:body use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap12:body use="literal"/>
          </wsdl:output>
          <wsdl:fault name="ArgumentExceptionFault">
            <soap12:fault name="ArgumentExceptionFault"
                          namespace="http://Corona.Services.UserMgmt.UserMgmtSrv.FaultException"/>
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="SaveHealthProfileWrapper">
          <wsdl:input>
            <soap12:body use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap12:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="UserMgmtSrv">
        <wsdl:port name="WSHttpBinding_UserMgmtSrv"
                   binding="tns:WSHttpBinding_UserMgmtSrv">
          <soap12:address location="https://debugger/Corona.Services/Corona.Services.svc"/>
          <wsa10:EndpointReference>
            <wsa10:Address>https://debugger/Corona.Services/Corona.Services.svc</wsa10:Address>
          </wsa10:EndpointReference>
        </wsdl:port>
      </wsdl:service>
      <wsp:Policy wsu:Id="WSHttpBinding_UserMgmtSrv_policy">
        <wsp:ExactlyOne>
          <wsp:All>
            <wspe:Utf816FFFECharacterEncoding xmlns:wspe="http://schemas.xmlsoap.org/ws/2004/09/policy/encoding"/>
            <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
              <wsp:Policy>
                <sp:TransportToken>
                  <wsp:Policy>
                    <sp:HttpsToken RequireClientCertificate="false"/>
                  </wsp:Policy>
                </sp:TransportToken>
                <sp:AlgorithmSuite>
                  <wsp:Policy>
                    <sp:Basic128/>
                  </wsp:Policy>
                </sp:AlgorithmSuite>
                <sp:Layout>
                  <wsp:Policy>
                    <sp:Strict/>
                  </wsp:Policy>
                </sp:Layout>
                <sp:IncludeTimestamp/>
              </wsp:Policy>
            </sp:TransportBinding>
            <sp:EndorsingSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
              <wsp:Policy>
                <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                  <wsp:Policy>
                    <mssp:RequireCancel wsp:Optional="true"
                                        xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy"/>
                    <sp:BootstrapPolicy>
                      <wsp:Policy>
                        <sp:TransportBinding>
                          <wsp:Policy>
                            <sp:TransportToken>
                              <wsp:Policy>
                                <sp:HttpsToken RequireClientCertificate="false"/>
                              </wsp:Policy>
                            </sp:TransportToken>
                            <sp:AlgorithmSuite>
                              <wsp:Policy>
                                <sp:Basic128/>
                              </wsp:Policy>
                            </sp:AlgorithmSuite>
                            <sp:Layout>
                              <wsp:Policy>
                                <sp:Strict/>
                              </wsp:Policy>
                            </sp:Layout>
                            <sp:IncludeTimestamp/>
                          </wsp:Policy>
                        </sp:TransportBinding>
                        <sp:EndorsingSupportingTokens>
                          <wsp:Policy>
                            <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                              <wsp:Policy>
                                <mssp:RequireCancel wsp:Optional="true"
                                                    xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy"/>
                              </wsp:Policy>
                            </sp:SpnegoContextToken>
                          </wsp:Policy>
                        </sp:EndorsingSupportingTokens>
                        <sp:Trust10>
                          <wsp:Policy>
                            <sp:MustSupportIssuedTokens/>
                            <sp:RequireClientEntropy/>
                            <sp:RequireServerEntropy/>
                          </wsp:Policy>
                        </sp:Trust10>
                      </wsp:Policy>
                    </sp:BootstrapPolicy>
                  </wsp:Policy>
                </sp:SecureConversationToken>
              </wsp:Policy>
            </sp:EndorsingSupportingTokens>
            <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
              <wsp:Policy>
                <sp:MustSupportIssuedTokens/>
                <sp:RequireClientEntropy/>
                <sp:RequireServerEntropy/>
              </wsp:Policy>
            </sp:Trust10>
            <wsap10:UsingAddressing/>
          </wsp:All>
        </wsp:ExactlyOne>
      </wsp:Policy>
      <wsp:UsingPolicy/>
    </wsdl:definitions>

    I had the problem with JDev (9.0.4) when trying to generate server side classes from a homemade wsdl which took a complex type as a parameter. The only thing I got from JDeveloper was a class receiving an Element. Which pretty much means you have to do the work yourself.
    Quite disappointing....!
    I see to possibilities:
    1) If you are stuck with 9.0.4 you will have to parse to and from xml yourself. For this you can use jax-b which is a Sun API used to create classes for a given XML Schema to parse and validate XML. You have some work creating the classes, but it runs very fast when you have generated the classes.
    2) You use the topdown approach described on OTN. http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/doc-lit/index.html
    I think this is the example for OC4J (9.0.4). There is a new and improved version of the tool (wsa.jar) with the new OC4J (10.1.3)
    Have fun......and I am sure that Oracle quite soon will deliver the functionality directly from JDev....:-)
    /Peter

  • Parse WSDL and XSD

    Hi all,
    i have to parse a WSDL, i found the javax.wsdl.xml.WSDLReader. this permits to parse all but not the XSD inside the wsdl.
    i.e.
    the wsdl
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/NewWSDLFile/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NewWSDLFile" targetNamespace="http://www.example.org/NewWSDLFile/">
      <wsdl:types>
        <xsd:schema targetNamespace="http://www.example.org/NewWSDLFile/">
          <xsd:element name="NewOperation">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="in" type="xsd:string"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="NewOperationResponse">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="out" type="xsd:string"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:schema>
      </wsdl:types>
      <wsdl:message name="NewOperationRequest">
        <wsdl:part element="tns:NewOperation" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="NewOperationResponse">
        <wsdl:part element="tns:NewOperationResponse" name="parameters"/>
      </wsdl:message>
      <wsdl:portType name="NewWSDLFile">
        <wsdl:operation name="NewOperation">
          <wsdl:input message="tns:NewOperationRequest"/>
          <wsdl:output message="tns:NewOperationResponse"/>
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="NewWSDLFileSOAP" type="tns:NewWSDLFile">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="NewOperation">
          <soap:operation soapAction="http://www.example.org/NewWSDLFile/NewOperation"/>
          <wsdl:input>
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="NewWSDLFile">
        <wsdl:port binding="tns:NewWSDLFileSOAP" name="NewWSDLFileSOAP">
          <soap:address location="http://www.example.org/"/>
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>the code used:
                    WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
                    Definition def = reader.readWSDL("NewWSDLFile.wsdl");
                    System.out.println(def.toString());the result
    Retrieving document at 'NewWSDLFile.wsdl'.
    Definition: name={http://www.example.org/NewWSDLFile/}NewWSDLFile targetNamespace=http://www.example.org/NewWSDLFile/
    Types:
    SchemaExtensibilityElement ({http://www.w3.org/2001/XMLSchema}schema):
    required=null
    element=[xsd:schema: null]
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationResponse
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperationResponse
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationRequest
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperation
    PortType: name={http://www.example.org/NewWSDLFile/}NewWSDLFile
    Operation: name=NewOperation
    style=REQUEST_RESPONSE
    Input: name=null
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationRequest
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperation
    Output: name=null
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationResponse
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperationResponse
    Binding: name={http://www.example.org/NewWSDLFile/}NewWSDLFileSOAP
    PortType: name={http://www.example.org/NewWSDLFile/}NewWSDLFile
    Operation: name=NewOperation
    style=REQUEST_RESPONSE
    Input: name=null
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationRequest
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperation
    Output: name=null
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationResponse
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperationResponse
    BindingOperation: name=NewOperation
    BindingInput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    BindingOutput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
    required=null
    soapActionURI=http://www.example.org/NewWSDLFile/NewOperation
    SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
    required=null
    transportURI=http://schemas.xmlsoap.org/soap/http
    style=document
    Service: name={http://www.example.org/NewWSDLFile/}NewWSDLFile
    Port: name=NewWSDLFileSOAP
    Binding: name={http://www.example.org/NewWSDLFile/}NewWSDLFileSOAP
    PortType: name={http://www.example.org/NewWSDLFile/}NewWSDLFile
    Operation: name=NewOperation
    style=REQUEST_RESPONSE
    Input: name=null
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationRequest
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperation
    Output: name=null
    Message: name={http://www.example.org/NewWSDLFile/}NewOperationResponse
    Part: name=parameters
    elementName={http://www.example.org/NewWSDLFile/}NewOperationResponse
    BindingOperation: name=NewOperation
    BindingInput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    BindingOutput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
    required=null
    soapActionURI=http://www.example.org/NewWSDLFile/NewOperation
    SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
    required=null
    transportURI=http://schemas.xmlsoap.org/soap/http
    style=document
    SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address):
    required=null
    locationURI=http://www.example.org/as you can see there's no line that say what kind of data there are inside the message .
    these lines are not mentioned:
      <xsd:element name="NewOperation">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="in" type="xsd:string"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="NewOperationResponse">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="out" type="xsd:string"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>any ideas about how to read the types of the messages?
    Edited by: ELStefen on 11-nov-2009 10.55

    Farhan_Khan wrote:
    Can you please elaborate a little more on the following
    if you want to parse the XSD you have to take the string between the <type> </type>
    - How do I do this ?
    takes the wsdl as string, takes the position of <type> and </type>. Now you can simply remove all the rest and keep all the string inside these 2 word.
    and add all the namespace of the wsdl (this step is very important, otherwise it not works).
    - No clue about this. Please explain.
    This is a tricky way that i discovered.
    SimpleXML wants all the namespaces involved into the Types. Sometimes these namespaces are written in the top of the wsdl but you don't have these information in the XSD.
    So replace the XSD header adding (replace the string) all the namespaces found inside the wsdl.
    Note:- I've been working on this for the last 3 weeks but no success and nobody ready to help. Your help would be greatly appreciated.
    Thanks
    Farhanthis is an example, i don't remember what it does :D
    package invokation;
    import java.io.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.StringTokenizer;
    import java.util.Map.Entry;
    import org.apache.ws.commons.schema.XmlSchema;
    import org.apache.ws.commons.schema.XmlSchemaElement;
    import org.apache.ws.commons.schema.XmlSchemaImport;
    import org.apache.ws.commons.schema.XmlSchemaObject;
    import org.apache.ws.commons.schema.XmlSchemaObjectTable;
    import javax.wsdl.Definition;
    import javax.wsdl.factory.WSDLFactory;
    import javax.wsdl.xml.WSDLReader;
    import javax.xml.namespace.QName;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.ws.commons.schema.XmlSchemaCollection;
    * @author Stefano Tranquillini
    public class ParserXSD {
          * @deprecated
          * @param args
         public static void main(String[] args) {
              new ParserXSD().ParseXSD("Test.wsdl");
         private static ArrayList<QName> namespaces(String wsdl) {
              try {
                   WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
                   Definition def = reader.readWSDL(wsdl);
                   reader.setFeature("javax.wsdl.verbose", true);
                   reader.setFeature("javax.wsdl.importDocuments", true);
                   // Namespaces
                   // read all the namespaces
                   Map nss = def.getNamespaces();
                   ArrayList<QName> ns = new ArrayList<QName>();
                   for (Iterator iterator = nss.entrySet().iterator(); iterator
                             .hasNext();) {
                        Entry e = (Entry) iterator.next();
                        ns.add(new QName("" + e.getKey(), "" + e.getValue()));
                   return ns;
              } catch (Exception e) {
                   e.printStackTrace();
                   return null;
         private static InputStream parseStringToIS(String str) {
              if (str == null)
                   return null;
              str = str.trim();
              java.io.InputStream in = null;
              try {
                   in = new java.io.ByteArrayInputStream(str.getBytes("UTF-8"));
              } catch (Exception ex) {
              return in;
         public static ArrayList<QName> ParseXSD(String filename) {
              ArrayList<QName> ret = new ArrayList<QName>();
              try {
                   ArrayList<QName> ns = namespaces(filename);
                   // read the all namesapces
                   // and add they at schema
                   File f = new File(filename);
                   FileInputStream fis = new FileInputStream(f);
                   InputStreamReader isr = new InputStreamReader(fis);
                   BufferedReader br = new BufferedReader(isr);
                   String linea = br.readLine();
                   String all = "";
                   while (linea != null) {
                        linea = br.readLine();
                        all = all + linea;
                   // extract only the types
                   int start = all.indexOf("<wsdl:types>") + "<wsdl:types>".length();
                   int end = all.indexOf("</wsdl:types>");
                   String xsd = "";
                   // not sure about this if
                   if (start >= 0 && end > start) {
                        xsd = all.substring(start, end);
                   } else {
                        xsd = all;
                   String ns_toAdd = "";
                   for (QName qname : ns) {
                        ns_toAdd += " xmlns:" + qname.getNamespaceURI() + "=\""
                                  + qname.getLocalPart() + "\"";
                   xsd = xsd.replace("schema ", "schema " + ns_toAdd + " ");
                   xsd = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + xsd;
                   // end namespace addition
                   // read the xsd and extract information
                   System.out.println(xsd);
                   InputStream is = parseStringToIS(xsd);
                   XmlSchemaCollection schemaCol = new XmlSchemaCollection();
                   XmlSchema schema = (XmlSchema) schemaCol.read(new StreamSource(is),null);
                   System.out.println();
    //now here i don't remember.
    //try to takes information from schema
                   if (schema.getIncludes().getCount() > 0) {
                        for (int i = 0; i < schema.getIncludes().getCount(); i++) {
                             XmlSchemaImport xmlso = (XmlSchemaImport) schema
                                       .getIncludes().getItem(i);
                             XmlSchemaObjectTable elements = xmlso.getSchema().getElements();
                             schema.write(System.out);
                             System.out.println(elements.getCount());
                             for (Iterator iterator = elements.getNames(); iterator
                                       .hasNext();) {
                                  // extract the QNAME of each operation used in the SOAP
                                  // MESSAGE
                                  QName name = (QName) iterator.next();
                                  ret.add(name);
                   XmlSchemaObjectTable elements = schema.getElements();
                   schema.write(System.out);
                   System.out.println(elements.getCount());
                   for (Iterator iterator = elements.getNames(); iterator.hasNext();) {
                        // extract the QNAME of each operation used in the SOAP MESSAGE
                        QName name = (QName) iterator.next();
                        ret.add(name);
                   System.out.println(ret);
                   return ret;
              } catch (Exception e) {
                   e.printStackTrace();
                   return ret;
    }

  • How to create RPC encoded wsdl for the bpel project created in jdeveloper?

    Hi,
    I have to create a bpel project in jdeveloper with the wsdl of the project in rpc encoded format. By default when we create a bpel project in jdeveloper it creates a wsdl file of document literal format, but i need the wsdl to be rpc encoded format. Please let me know how can i achieve this.
    Thanks.

    Hi Nico,
    Thanks for your reply.
    You mentioned to specify type in place of element, from where do you get this type and what more changes we need to do for the entire project to compile well with out errors.
    As suggested by you, I changed the element to type and tried to compile, it is giving the below error.
    Error:
    [Error ORABPEL-10902]: compilation failed
    [Description]: in "bpel.xml", XML parsing failed because "undefined part type.
    In WSDL at "file:/D:/indu/jdevstudio10134/jdev/mywork/TimerApplication/SelectDB/bpel/SelectDB.wsdl", message part type "SelectDBProcessRequestType" is not defined in any of the schemas.
    Please make sure the spelling of the type QName is correct and the WSDL import is complete.
    [Potential fix]: n/a.
    Please let me know what are all the changes that need to be done to complie the project successfully.
    Thanks and Regards.

  • .v2.XMLParseException:Can not find definition for element 'descriptor'

    I am getting the following error, while running 'empps.jsp' ...when executing the tutorial given at
    ERROR Details:
    500 Internal Server Error
    javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'employees' from bean of type jsftoplink.model.EmployeesClient: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.XMLMarshalExceptionException Description: An error occurred unmarshalling the documentInternal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.platform.xml.XMLPlatformExceptionException Description: An error occurred while parsing the document.Internal Exception: oracle.xml.parser.v2.XMLParseException: Can not find definition for element 'class-descriptor-type'     at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.java:501)     at emps.jspService(_emps.java:629)
    Pls help me in resolving this issue.

    I am still gettng the same error. The xml file is now
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="" ID="568945">
    <FIRSTNAME>Arnold</FIRSTNAME>
    <LASTNAME>McEriccson</LASTNAME>
    <ADDRESS>
    <LINE1>31, Nomadic Avevnue</LINE1>
    <LINE2>Pasadena Clove</LINE2>
    <CITY>WoolTown, MT</CITY>
    <ZIP>45263</ZIP>
    </ADDRESS>
    <BIRTHDATE>1967-08-13</BIRTHDATE>
    </CUSTOMER>
    The xsd file is:
    <?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="FIRSTNAME" type="xs:string"/> <xs:element name="LASTNAME" type="xs:string"/> <xs:element name="ADDRESS"> <xs:complexType>
    <xs:sequence>
    <xs:element name="LINE1" type="xs:string"/> <xs:element name="LINE2" type="xs:string"/> <xs:element name="CITY"/>
    <xs:element name="ZIP" type="xs:int"/> </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="BIRTHDATE" type="xs:date"/> </xs:sequence>
    <xs:attribute name="ID" type="xs:double"/> </xs:complexType>
    </xs:element>
    </xs:schema>
    There seems to be something fairly obvious that i am missing.

  • XML Parsing Error: no element found Location:Line Number 1, Column 1:

    Hi,
    i have a servlet code in which i am using bouncy castle encryption algorithm , if i tried to run that servlet on embeded weblogic server than my servlet works fine without error.
    but if i deploy same Servlet code on SOA domain console than i get following error.
    XML Parsing Error: no element found
    Location: http://localhost:7001/Encryption-PGPEncrypt-context-root/pgpservlet
    Line Number 1, Column 1:
    Please help me friends...

    Hi Chandra,
    Based on my research, the error message is only generated by FireFox when the render page is blank in Internet. For some reason, .NET generates a response type of "application/xml" when it creates an empty page. Firefox parses the file as XML and finding
    no root element, spits out the error message.
    Also, based on your description, the other sites are opened correctly, the issue only happened in Central Administration(CA). This means the SharePoint services are working fine.
    Since this issue only occurred in the CA, it might be due the application pool for the CA is corrupted. Please try to restart the application pool for the CA to resove the issue:
    1. Open Internet Information Service(IIS)
    2. List the application pools
    3. Select the application pool used for the CA
    4. Stop it, and then start it again.
    Note, if the application pool is running in Classic mode, please change it to be Integrated mode.
    Additionally, I found a similar thread, which may help you too:
    http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/824d7dda-db03-452b-99c4-531c5c576396
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • XML Parsing Error: no element found Line Number 1, Column 1:

    Hi All,
    I have deployed EAR on my standalone server using JDEV 11.1.1.6.0. I am able to get the WSRP portlet producer page on
    http://<server>:7001/contextRoot. But when i try to click on any of the WSDL URL it gives me "XML Parsing Error: no element found Line Number 1, Column 1:"
    and from IE it gives me: XML document must have a top level element. Error processing resource
    there can be a issue with the WSRPContainer.jar file. So i have remove it from my deployment profile, EAR and lib/classpath files.
    Can you please suggest a workaround.
    Regards,
    ND
    Edited by: ND on Dec 4, 2012 9:57 PM

    Hi All,
    this error normally comes when the WLS domain is not not properly created. if you get some exception for ./provesecurity.sh file while creating the domain, then the XML error comes.
    I did not went into the depth but figured out a workaround: restart the VM/hosted box and then create the domain, remember to use diff port name while creating it from the domain creation script.
    Regards,
    ND

  • Why no support for element factories?

    The XML parser should support user supplied element factories.
    That is, I should be able to instruct the parser to use my
    class when creating elements and attributes it encounters.
    Among other things, this would allow me to exclude certain
    elements/attributes from the parse tree as it is being
    constructed, rather than having to filter them in a subsequent
    walk of the DOM tree.
    Both the IBM and the Microsoft parser support this functionality.
    Here, for example, is the Microsoft interface I can implement
    in order to receive callbacks for element creation:
    interface ElementFactory
    public Element createElement(Element parent, int type, Name
    tag, String text);
    public void parsed(Element elem);
    public void parsedAttribute(Element e, Name name, Object
    value);
    null

    Node Factory exposure along with some additional APIs are planned
    for the production release in a few weeks.
    Eric Friedman (guest) wrote:
    : The XML parser should support user supplied element factories.
    : That is, I should be able to instruct the parser to use my
    : class when creating elements and attributes it encounters.
    : Among other things, this would allow me to exclude certain
    : elements/attributes from the parse tree as it is being
    : constructed, rather than having to filter them in a subsequent
    : walk of the DOM tree.
    : Both the IBM and the Microsoft parser support this
    functionality.
    : Here, for example, is the Microsoft interface I can implement
    : in order to receive callbacks for element creation:
    : interface ElementFactory
    : public Element createElement(Element parent, int type, Name
    : tag, String text);
    : public void parsed(Element elem);
    : public void parsedAttribute(Element e, Name name, Object
    : value);
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

Maybe you are looking for

  • Ipod not working after Europe trip

    I have a 20GB Ipod with click wheel, purchased in March 2005. I spent two months in Germany this summer. During that time I charged my Ipod several times using a plug adapter. I know that a voltage converter is not needed for the Ipod, as the charger

  • Music Editing with Audio Hijack or WireTap

    WireTap Pro vs. Audio Hijack with Fission for one simple editing task I have a collection of about 500 pieces of classical music in iTunes and on my iPod and iPhone. Some recordings come with adequate fade-out or decay time at the end of each piece o

  • 10.1.0.4 to 10.2.x

    I need to upgrade a 10.1.0.4 database server to 10.2.x. It look like different release of Oracle don't follow the same path for upgrade and that there is no patchset to realize what I whish. I want to understand what need to be done. Does the 10.2 sh

  • IE11 icloud Calendar icon

    Hi All, I'm just setting up my main Windows PC with shortcut links to the Start Screen tiles I've added iCould into these links so I can access my iCalendar and stuff quickly - however the icon for the calendar in iCloud is messed up. I have a feelin

  • Alternative for Guided Navigation

    Hi Al, I have a scenario!! If the number of record count is greater den 30 then a report without legends is displayed and if less then 30,report with legends is displayed.. This I hv implemented.. but its taking 2 clicks to generate the report.. So c