axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Houman Moshtagh" <dev_w...@yahoo.de>
Subject Simple QName Question
Date Sun, 04 Aug 2002 14:28:50 GMT
Hi,

I can not programming a running client. The sample is very easy, just a
"helloworld" String is coming from the server.
Somehow I can't read the right QName.  It says "WSDL Reader: The
Operation requested in the Soap message with soapAction   isn't defined
in the WSDL file. This may be because it is in the wrong namespace or
has incorrect case."

Could someone help me to find the right QName from my generated WSDL
file below?  
Thanks a lot
Houman


package pIIS;

import java.net.URL;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import org.w3c.dom.NodeList;
import javax.xml.namespace.QName;

import javax.xml.rpc.ParameterMode;
import javax.xml.soap.SOAPException;

public class Client
{
    public static void main(String [] args)
    {
        try {
        	String
wsdl="http://localhost:8010/soap3docsamples/test/server/ProjectTest.WSDL
";
           Service  service = new Service();
           Call     call    = (Call) service.createCall();

           call.setTargetEndpointAddress( new java.net.URL(wsdl) );
---->      call.setOperationName(new QName(
"http://tempuri.org/ProjectTest/message/" , "test") );
           String ret = (String) call.invoke( new Object[] {} );
           System.out.println("ok");	
            
            } catch (Exception e) {
            System.err.println(e.toString());
        }
 
}
}


The WSDL file:


<?xml version='1.0' encoding='UTF-8' ?>
<definitions
	name='ProjectTest'
	targetNamespace='http://tempuri.org/ProjectTest/wsdl/'
	xmlns:wsdlns='http://tempuri.org/ProjectTest/wsdl/'
	xmlns:typens='http://tempuri.org/ProjectTest/type/'
	xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
	xmlns:xsd='http://www.w3.org/2001/XMLSchema'
	
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
	xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
	xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
	
xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
	xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
	xmlns='http://schemas.xmlsoap.org/wsdl/'>

	<types>
		<schema
	
targetNamespace='http://tempuri.org/ProjectTest/type/'
			xmlns='http://www.w3.org/2001/XMLSchema'
	
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
			xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
			elementFormDefault='qualified'>

			<import
namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
			<import
namespace='http://schemas.xmlsoap.org/wsdl/'/>
			<import
namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
			<import
namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>

		</schema>
	</types>

	<message name='SoapTest.test'>
	</message>

	<message name='SoapTest.testResponse'>
		<part name='Result' type='xsd:string'/>
	</message>

	<portType name='SoapTestSoapPort'>

		<operation name='test' parameterOrder=''>
			<input message='wsdlns:SoapTest.test'/>
			<output message='wsdlns:SoapTest.testResponse'/>
		</operation>

	</portType>

	<binding name='SoapTestSoapBinding'
type='wsdlns:SoapTestSoapPort' >

		<stk:binding preferredEncoding='UTF-8'/>
		<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>

		<operation name='test'>
			<soap:operation
soapAction='http://tempuri.org/ProjectTest/action/SoapTest.test'/>
			<input>
				<soap:body
					use='encoded'
	
namespace='http://tempuri.org/ProjectTest/message/'
	
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
			</input>
			<output>
				<soap:body
					use='encoded'
	
namespace='http://tempuri.org/ProjectTest/message/'
	
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
					parts='Result'/>
			</output>
		</operation>

	</binding>

	<service name='ProjectTest' >
		<port name='SoapTestSoapPort'
binding='wsdlns:SoapTestSoapBinding' >
			<soap:address
location='http://localhost:80/soap3docsamples/test/server/ProjectTest.WS
DL'/>
		</port>
	</service>

</definitions>


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de

Mime
View raw message