axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronny Riedel (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2376) incomplete generation of 'Stub' due to missing <wsdl:part .../> of (WSDL-)Message
Date Thu, 19 Jan 2006 15:53:44 GMT
incomplete generation of 'Stub' due to missing <wsdl:part .../> of (WSDL-)Message
---------------------------------------------------------------------------------

         Key: AXIS-2376
         URL: http://issues.apache.org/jira/browse/AXIS-2376
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: current (nightly), 1.2.1, 1.3    
 Environment: SuSE Linux Enterprise Server 9
-- 
Apache Tomcat/5.0.27
-- 
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
    Reporter: Ronny Riedel


I have the following lines in my wsdl-file

    [...]

    <!-- Funktion: "getEnvironment" -->
    <wsdl:message name="getEnvironmentRequest" />
    <wsdl:message name="getEnvironmentResponse">
       <wsdl:part element="tns1:getEnvironmentResponse" name="parameters"/>
    </wsdl:message>
    <!-- Funktion: "getEnvEntry" -->
    <wsdl:message name="getEnvEntryRequest">
       <wsdl:part element="tns1:getEnvEntry" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="getEnvEntryResponse">
       <wsdl:part element="tns1:getEnvEntryResponse" name="parameters"/>
    </wsdl:message>

    [...]

How you can see, the request of "getEnvironment" has no <wsdl:part .../>. Based on these
WSDL-File, i created all java-objects with

    java -cp [necessary jar's] org.apache.axis.wsdl.WSDL2Java -s -S true -t environment.wsdl

The generated stub contains the following lines

    /*
     *
     */
    public EnvEntry[] getEnvironment() throws RemoteException, NGITException {
        if (super.cachedEndpoint == null) {
            throw new org.apache.axis.NoEndPointException();
        }
        org.apache.axis.client.Call _call = createCall();
        _call.setOperation(_operations[0]);
        _call.setUseSOAPAction(true);
        _call.setSOAPActionURI("");
        _call.setEncodingStyle(null);
        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);

        setRequestHeaders(_call);
        setAttachments(_call);

        [...]
    }

    /*
     *
     */
    public EnvEntry getEnvEntry(String p_strEnvEntryName) throws RemoteException, NGITException
{
        if (super.cachedEndpoint == null) {
            throw new org.apache.axis.NoEndPointException();
        }
        org.apache.axis.client.Call _call = createCall();
        _call.setOperation(_operations[1]);
        _call.setUseSOAPAction(true);
        _call.setSOAPActionURI("");
        _call.setEncodingStyle(null);
        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
        _call.setOperationName(new javax.xml.namespace.QName("http://types.xxx.de/", "getEnvEntry"));

        setRequestHeaders(_call);
        setAttachments(_call);
    }

How you can see, the function-call "_call.setOperationName([...])" of the _call-Object in
the first function isn't created. If i run the corresponding JUnit-Test case, i got the following
error for the function "getEnvironment()"

    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultSubcode:
    faultString: No operation name specified!
    faultActor:
    faultNode:
    faultDetail:
      {http://xml.apache.org/axis/}stackTrace:No operation name specified!
      at org.apache.axis.client.Call.invoke(Call.java:1801)
      at de.xxx.AdminServiceSoapBindingStub.getEnvironment(AdminServiceSoapBindingStub.java:215)
      at de.xxx.AdminService_v2_0TestCase.test1AdminService_v2_0GetEnvironment(AdminService_v2_0TestCase.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)

      {http://xml.apache.org/axis/}hostname:dbnu032

    No operation name specified!
      at org.apache.axis.client.Call.invoke(Call.java:1801)
      at de.xxx.AdminServiceSoapBindingStub.getEnvironment(AdminServiceSoapBindingStub.java:215)
      at de.xxx.AdminService_v2_0TestCase.test1AdminService_v2_0GetEnvironment(AdminService_v2_0TestCase.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)

In the Axis-Java-Class "org.apache.axis.client.Call" around line 1800 the following condition
is implemented

     if ( operationName == null ) {
        throw new AxisFault( Messages.getMessage("noOperation00") );
     }

I downloaded "http://cvs.apache.org/dist/axis/nightly/axis-bin-1_4.zip" today and run WSDL2Java
with my wsdl-file again and got the same error. Didn't Axis support "<wsdl:message ...>"
without "<wsdl:part ... />"?

some notes
   1) need wrapped-style
   2) if i invoke the deployed service via "http://myService?method=getEnvironment" everything
works fine



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message