Jump to content

Web Services Mgr - errors with generated WSDL


This topic is 3242 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I'm evaluating Web Services Manager.  I'm setting up an operation using custom XML.  The generated WSDL is below and it gives me these errors when trying the 360 works soap client (on the 'retrieve" action with the WSDL url):

- undefined element declaration 'CALL' on line 7

- undefineed attribute group 'attlist.DATA2SC' on line 9

- undefined element declaration 'ATTR' on line 19

- undefined attribute group 'attlist.CALL' on line 21

As far as I can tell those declarations are all there, and properly referenced: CALL is defined on line 16, attlist.DATA2SC on line 12, etc...

Is there another syntax I should use?

 

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://x.x.x.x" xmlns:tns="http://x.x.x.x" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/soap/http" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:db1="http://172.17.209.11/WSMExamples">
  <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xxx.xx.xxx.xx/WSMExamples"><element name="DATA2SC">
    <complexType>
      <sequence>
        <element minOccurs="0" maxOccurs="unbounded" ref="CALL"/>
      </sequence>
      <attributeGroup ref="attlist.DATA2SC"/>
    </complexType>
  </element>
  <attributeGroup name="attlist.DATA2SC">
    <attribute name="PIN" use="required"/>
    <attribute name="ID" use="required"/>
  </attributeGroup>
  <element name="CALL">
    <complexType>
      <sequence>
        <element minOccurs="0" maxOccurs="unbounded" ref="ATTR"/>
      </sequence>
      <attributeGroup ref="attlist.CALL"/>
    </complexType>
  </element>
  <attributeGroup name="attlist.CALL">
    <attribute name="DATETIME" default="NA"/>
    <attribute name="OPERATOR" default="NA"/>
    <attribute name="CALLER" default="NA"/>
    <attribute name="CATEGORY" default="NA"/>
    <attribute name="SUB" default="NA"/>
    <attribute name="LOC" default="NA"/>
    <attribute name="TRADE" default="NA"/>
    <attribute name="PRO" default="NA"/>
    <attribute name="STATUS" default="NA"/>
    <attribute name="PRIORITY" default="NORMAL"/>
    <attribute name="NTE" default="NA"/>
    <attribute name="SCHED_DATETIME" default="NA"/>
    <attribute name="COMPL_DATETIME" default="NA"/>
    <attribute name="TR_NUMCDATA" default="NORMAL"/>
    <attribute name="PO_NUM" default="NA"/>
    <attribute name="WO_NUM" default="NA"/>
    <attribute name="RECALL" default="NA"/>
    <attribute name="RECALL_TR_NUM" default="NA"/>
    <attribute name="PROBLEM" default="NA"/>
    <attribute name="RESOL" default="NA"/>
  </attributeGroup>
  <element name="ATTR" abstract="true"/>
  <attributeGroup name="attlist.ATTR">
    <attribute name="NAME" default="NA"/>
    <attribute name="LINE" default=""/>
    <attribute name="NEW_SCHED_DATETIME" default="NA"/>
    <attribute name="CREATED_BY" default="NA"/>
    <attribute name="DATETIME" default="NA"/>
  </attributeGroup><complexType name="Example"><sequence><element name="OutputValue" type="xsd:string" nillable="true"/></sequence></complexType><element name="SC_New_Service_RequestResponse"><complexType><sequence><element name="Example" minOccurs="1" maxOccurs="1" type="db1:Example"/></sequence></complexType></element></schema>
  </types>
  <message name="SC_New_Service_Request">
    <part name="parameters" element="db1:SC_New_Service_Request"/>
  </message>
  <message name="SC_New_Service_RequestResponse">
    <part name="parameters" element="db1:SC_New_Service_RequestResponse"/>
  </message>
  <portType name="ServiceChannel">
    <operation name="SC_New_Service_Request">
      <documentation>New Service Request sent from ServiceChannel</documentation>
      <input message="tns:SC_New_Service_Request"/>
      <output message="tns:SC_New_Service_RequestResponse"/>
    </operation>
  </portType>
  <binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServiceChannel" type="tns:ServiceChannel">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
    <operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="SC_New_Service_Request">
      <soap:operation style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
      <input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
        <soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
      </input>
      <output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
        <soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
      </output>
    </operation>
  </binding>
  <service xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServiceChannel">
    <documentation></documentation>
    <port xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServiceChannel" binding="tns:ServiceChannel">
      <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://xxx.xx.xxx.xx/websvcmgr.php"/>
    </port>
  </service>
</definitions>

 

 

Link to comment
Share on other sites

There are a few adjustments that need to be made in order to get this to work. In your case, the ref attributes must be namespace qualified with the WSM-generated namespace associated with the WSM Examples file because the default namespace is "http://schemas.xmlsoap.org/wsdl/.” 

 

That means ref=“CALL” becomes ref=“db1:CALL” and so forth.

 

Also, you will notice a field underneath the Custom XML Schema field that is preceded by the following text:

 

Enter an alternate name for the message element generated in the WSDL for this operation, including the namespace prefix. (optional)

 

Enter db1:DATA2SC in this field. Try testing again and you should be good to go. Let me know if you run into any more problems.

 

I would expect your WSDL to look more like this after you make these adjustments:

 

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"

          targetNamespace="http://x.x.x.x"

          xmlns:tns="http://x.x.x.x"

          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

          xmlns:xsd="http://www.w3.org/2001/XMLSchema"

          xmlns:db1="http://x.x.x.x/WSMExamples">

   <types>

      <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"

            targetNamespace="http://x.x.x.x/WSMExamples">

         <element name="DATA2SC">

            <complexType>

               <sequence>

                  <element minOccurs="0" maxOccurs="unbounded" ref="db1:CALL"/>

               </sequence>

               <attributeGroup ref="db1:attlist.DATA2SC"/>

            </complexType>

         </element>

         <attributeGroup name="attlist.DATA2SC">

            <attribute name="PIN" use="required"/>

            <attribute name="ID" use="required"/>

         </attributeGroup>

         <element name="CALL">

            <complexType>

               <sequence>

                  <element minOccurs="0" maxOccurs="unbounded" ref="db1:ATTR"/>

               </sequence>

               <attributeGroup ref="db1:attlist.CALL"/>

            </complexType>

         </element>

         <attributeGroup name="attlist.CALL">

            <attribute name="DATETIME" default="NA"/>

            <attribute name="OPERATOR" default="NA"/>

            <attribute name="CALLER" default="NA"/>

            <attribute name="CATEGORY" default="NA"/>

            <attribute name="SUB" default="NA"/>

            <attribute name="LOC" default="NA"/>

            <attribute name="TRADE" default="NA"/>

            <attribute name="PRO" default="NA"/>

            <attribute name="STATUS" default="NA"/>

            <attribute name="PRIORITY" default="NORMAL"/>

            <attribute name="NTE" default="NA"/>

            <attribute name="SCHED_DATETIME" default="NA"/>

            <attribute name="COMPL_DATETIME" default="NA"/>

            <attribute name="TR_NUMCDATA" default="NORMAL"/>

            <attribute name="PO_NUM" default="NA"/>

            <attribute name="WO_NUM" default="NA"/>

            <attribute name="RECALL" default="NA"/>

            <attribute name="RECALL_TR_NUM" default="NA"/>

            <attribute name="PROBLEM" default="NA"/>

            <attribute name="RESOL" default="NA"/>

         </attributeGroup>

         <element name="ATTR" abstract="true"/>

         <attributeGroup name="attlist.ATTR">

            <attribute name="NAME" default="NA"/>

            <attribute name="LINE" default=""/>

            <attribute name="NEW_SCHED_DATETIME" default="NA"/>

            <attribute name="CREATED_BY" default="NA"/>

            <attribute name="DATETIME" default="NA"/>

         </attributeGroup>

         <complexType name="Example">

            <sequence>

               <element name="OutputValue" type="xsd:string" nillable="true"/>

            </sequence>

         </complexType>

         <element name="SC_New_Service_RequestResponse">

            <complexType>

               <sequence>

                  <element name="Example" minOccurs="1" maxOccurs="1" type="db1:Example"/>

               </sequence>

            </complexType>

         </element>

      </schema>

   </types>

   <message name="SC_New_Service_Request">

      <part name="parameters" element="db1:DATA2SC"/>

   </message>

   <message name="SC_New_Service_RequestResponse">

      <part name="parameters" element="db1:SC_New_Service_RequestResponse"/>

   </message>

   <portType name="ServiceChannel">

      <operation name="SC_New_Service_Request">

         <documentation>New Service Request sent from ServiceChannel</documentation>

         <input message="tns:SC_New_Service_Request"/>

         <output message="tns:SC_New_Service_RequestResponse"/>

      </operation>

   </portType>

   <binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServiceChannel" type="tns:ServiceChannel">

      <soap:binding transport="http://schemas.xmlsoap.org/soap/http"

                 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>

      <operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="SC_New_Service_Request">

         <soap:operation style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>

         <input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

            <soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>

         </input>

         <output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

            <soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>

         </output>

      </operation>

   </binding>

   <service xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServiceChannel">

      <documentation/>

      <port xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServiceChannel" binding="tns:ServiceChannel">

         <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

                    location="http://x.x.x.x/websvcmgr.php"/>

      </port>

   </service>

</definitions>

 

Regards,

 

Sterling Rouse

Developer

360Works

Link to comment
Share on other sites

This topic is 3242 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.