You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "willem Jiang (JIRA)" <ji...@apache.org> on 2006/12/07 04:02:23 UTC
[jira] Assigned: (CXF-294) JAX-WS Java first client side failure to
get port
[ http://issues.apache.org/jira/browse/CXF-294?page=all ]
willem Jiang reassigned CXF-294:
--------------------------------
Assignee: willem Jiang
> JAX-WS Java first client side failure to get port
> -------------------------------------------------
>
> Key: CXF-294
> URL: http://issues.apache.org/jira/browse/CXF-294
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0-M1
> Environment: Windows
> Reporter: Eric Johnson
> Assigned To: willem Jiang
>
> I created a client to connect to a service developed without a WSDL file. The SEI is:
> package org.eric.demo;
> import javax.jws.*;
> @WebService(name="quoteReporter")
> public interface quoteReporter
> {
> public Quote getQuote(String ticker);
> }
> The client code is:
> package org.eric.demo;
> import java.io.File;
> import java.net.URL;
> import javax.xml.namespace.QName;
> import javax.xml.ws.Service;
> public class Client
> {
> public static void main(String args[])
> {
> QName serviceName = new QName("http://demo.eric.org", "stockQuoteReporter");
> Service s = Service.create(serviceName);
> System.out.println("Service "+serviceName+" created...");
> QName portName = new QName("http://demo.eric.org", "stockQuoteReporterPort");
> quoteReporter proxy = s.getPort(portName, quoteReporter.class);
> System.out.println("Proxy created...");
> Quote quote = proxy.getQuote("ALPHA");
> System.out.println("Stock "+quote.getID()+" is worth "+quote.getVal()+" as of "+quote.getTime());
> }
> }
> The WSDL retrieved from the running service is:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="stockQuoteReporter" targetNamespace="http://demo.eric.org" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://demo.eric.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:types>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
> <xs:complexType name="quote">
> <xs:sequence>
> <xs:element minOccurs="0" name="ID" type="xs:string"/>
> <xs:element minOccurs="0" name="time" type="xs:string"/>
> <xs:element name="val" type="xs:float"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://demo.eric.org" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://demo.eric.org">
> <xsd:element name="getQuote">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="arg00" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="getQuoteResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="return" type="quote"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="getQuote">
> <wsdl:part name="getQuote" element="ns1:getQuote">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getQuoteResponse">
> <wsdl:part name="getQuoteResponse" element="ns1:getQuoteResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="stockQuoteReporterPortType">
> <wsdl:operation name="getQuote">
> <wsdl:input name="getQuote" message="ns1:getQuote">
> </wsdl:input>
> <wsdl:output name="getQuoteResponse" message="ns1:getQuoteResponse">
> </wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="stockQuoteReporterSoapBinding" type="ns1:stockQuoteReporterPortType">
> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="getQuote">
> <wsdlsoap:operation soapAction="" style="document"/>
> <wsdl:input name="getQuote">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
> <wsdl:output name="getQuoteResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="stockQuoteReporter">
> <wsdl:port name="stockQuoteReporterPort" binding="ns1:stockQuoteReporterSoapBinding">
> <wsdlsoap:address location="http://localhost:9000/EricStockQuote"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> When I run the client I get the following stack:
> [java] Service {http://demo.eric.org}stockQuoteReporter created...
> [java] Exception in thread "main" java.lang.NullPointerException: EndpointInfo can not be null!
> [java] at org.apache.cxf.endpoint.EndpointImpl.<init>(EndpointImpl.java:66)
> [java] at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.<init>(JaxWsEndpointImpl.java:56)
> [java] at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:272)
> [java] at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:200)
> [java] at javax.xml.ws.Service.getPort(Service.java:94)
> [java] at org.eric.demo.Client.main(Client.java:16)
> Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode):
> "Thread-4" daemon prio=6 tid=0x0b386108 nid=0xd64 runnable [0x0baef000..0x0baefb68]
> at java.io.FileInputStream.readBytes(Native Method)
> at java.io.FileInputStream.read(FileInputStream.java:194)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> - locked <0x02f218a0> (a java.io.BufferedInputStream)
> at java.io.FilterInputStream.read(FilterInputStream.java:111)
> at java.io.FilterInputStream.read(FilterInputStream.java:90)
> at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:90)
> at java.lang.Thread.run(Thread.java:595)
> "Thread-3" daemon prio=6 tid=0x0b337d38 nid=0xfa4 runnable [0x0baaf000..0x0baafbe8]
> at java.io.FileInputStream.readBytes(Native Method)
> at java.io.FileInputStream.read(FileInputStream.java:177)
> at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:90)
> at java.lang.Thread.run(Thread.java:595)
> "Thread-2" daemon prio=6 tid=0x0b2d5990 nid=0x94c runnable [0x0ba6f000..0x0ba6fc68]
> at java.io.FileInputStream.readBytes(Native Method)
> at java.io.FileInputStream.read(FileInputStream.java:194)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> - locked <0x02a58868> (a java.io.BufferedInputStream)
> at java.io.FilterInputStream.read(FilterInputStream.java:90)
> at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:90)
> at java.lang.Thread.run(Thread.java:595)
> "Low Memory Detector" daemon prio=6 tid=0x0097acb0 nid=0x86c runnable [0x00000000..0x00000000]
> "CompilerThread0" daemon prio=10 tid=0x00979880 nid=0xf28 waiting on condition [0x00000000..0x0abaf8cc]
> "Signal Dispatcher" daemon prio=10 tid=0x00978c00 nid=0x680 waiting on condition [0x00000000..0x00000000]
> "Finalizer" daemon prio=8 tid=0x0096fc70 nid=0x630 in Object.wait() [0x0ab2f000..0x0ab2fc68]
> at java.lang.Object.wait(Native Method)
> - waiting on <0x02f1ef70> (a java.lang.ref.ReferenceQueue$Lock)
> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
> - locked <0x02f1ef70> (a java.lang.ref.ReferenceQueue$Lock)
> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
> "Reference Handler" daemon prio=10 tid=0x0096e7d8 nid=0x13c in Object.wait() [0x0aaef000..0x0aaefce8]
> at java.lang.Object.wait(Native Method)
> - waiting on <0x02f1eff0> (a java.lang.ref.Reference$Lock)
> at java.lang.Object.wait(Object.java:474)
> at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
> - locked <0x02f1eff0> (a java.lang.ref.Reference$Lock)
> "main" prio=6 tid=0x00036d48 nid=0x714 runnable [0x0007f000..0x0007fc40]
> at java.lang.ProcessImpl.waitFor(Native Method)
> at org.apache.tools.ant.taskdefs.Execute.waitFor(Execute.java:539)
> at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:471)
> at org.apache.tools.ant.taskdefs.Java.fork(Java.java:751)
> at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:171)
> at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:378)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> at org.apache.tools.ant.Main.runBuild(Main.java:668)
> at org.apache.tools.ant.Main.startAnt(Main.java:187)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> "VM Thread" prio=10 tid=0x008b4cf8 nid=0xea0 runnable
> "VM Periodic Task Thread" prio=10 tid=0x0097be90 nid=0x688 waiting on condition
--
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