[JBoss JIRA] Created: (JBWS-2529) Missing type in generated WSDL part definition
by Alessio Soldano (JIRA)
Missing type in generated WSDL part definition
----------------------------------------------
Key: JBWS-2529
URL: https://jira.jboss.org/jira/browse/JBWS-2529
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-cxf
Reporter: Alessio Soldano
Fix For: jbossws-cxf-3.1.1
Running CXF java2wsdl tool on a service implementation like this
@WebService
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding.ParameterStyle.BARE)
public class webParamWebService {
...
@WebMethod(operationName="helloString8", action="urn:HelloString8")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding
.ParameterStyle.WRAPPED)
public String hello8(@WebParam (name="string8") String name, Address address) {
return "hello8 : " + address.getCity() + " to Web Service";
}
}
seems to cause a wrong wsdl being generated:
...
<wsdl:message name="helloString8">
<wsdl:part name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="helloString8Response">
<wsdl:part name="parameters">
</wsdl:part>
</wsdl:message>
...
The wsdl:part only have name parameter. This is currently preventing the webparam1 reverse test configuration in jws tck5 module, as the obtained wsdl cannot then be consumed by wsdl2java (because it's broken)
We should reproduce this and see if this is actually a cxf issue or an integration one.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month
[JBoss JIRA] Commented: (JBWS-2575) Client received com.sun.xml.ws.streaming.XMLStreamReaderException when invoking WebService annotated with OneWay
by Mosse Franck (JIRA)
[ https://jira.jboss.org/jira/browse/JBWS-2575?page=com.atlassian.jira.plug... ]
Mosse Franck commented on JBWS-2575:
------------------------------------
True, wsdl and stub generated for the client are generated using Metro. The client uses the wsdl provided localy (no invocation on the remote server).
> Client received com.sun.xml.ws.streaming.XMLStreamReaderException when invoking WebService annotated with OneWay
> ----------------------------------------------------------------------------------------------------------------
>
> Key: JBWS-2575
> URL: https://jira.jboss.org/jira/browse/JBWS-2575
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Environment: JBoss 5.0.0 under Windows XP
> wsdl and stub generated using jax-ws tools
> Reporter: Mosse Franck
>
> A standalone client receives an exception when it tries to invoke a web service annotated with @OneWay.
> The exception received on the client side is :
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:242)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:70)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:85)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:75)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:167)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:149)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:121)
> at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:280)
> at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:158)
> at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
> at com.sun.xml.ws.client.Stub.process(Stub.java:235)
> at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
> at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
> at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
> at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
> at $Proxy30.createPerson(Unknown Source)
> at test.example1.TestPeopleManager.testCreatePerson(TestPeopleManager.java:41)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
> at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)
> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
> at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:56)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:51)
> ... 39 more
> The code of the web service is :
> package test.example1;
> import javax.ejb.Stateless;
> import javax.jws.Oneway;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> @WebService( name="PeopleManager", serviceName="PeopleManager", targetNamespace="http://techtip.com/samples/example1")
> @Stateless
> public class PeopleManager {
> @WebMethod( operationName="createPerson")
> @Oneway
> public void createPerson ( @WebParam(name="firstName") String firstName, @WebParam(name="lastName")String lastName, @WebParam(name="age") int age)
> {
> System.out.println ("Creating person [firstName=" + firstName + "; lastName=" + lastName + ";age=" + age + "]");
> }
> }
> Remark : If the @OneWay annotation is removed, the invocation from the client is successful.
> The code of the client is :
> package test.example1;
> import java.net.MalformedURLException;
> import java.net.URL;
> import javax.xml.namespace.QName;
> import org.junit.BeforeClass;
> import org.junit.Test;
> import test.example1.generated.*;
> public class TestPeopleManager {
>
> private static PeopleManager peopleManager;
> private static final String HOST_NAME = "localhost";
> private static final String PORT_NUMBER = "8080";
> private static final String TARGET_NAMESPACE = "http://techtip.com/samples/example1";
>
> @BeforeClass
> public static void beforeClass () throws MalformedURLException
> {
> String wsdlUrl = "http://" + HOST_NAME + ":" + PORT_NUMBER + "/TestWebService/PeopleManager?wsdl";
> URL wsdlLocation = new URL( wsdlUrl);
> QName serviceName = new QName(
> TARGET_NAMESPACE,
> "PeopleManager"
> );
>
> PeopleManager_Service service = new PeopleManager_Service(
> wsdlLocation, serviceName
> );
>
> peopleManager = service.getPeopleManagerPort ();
>
> }
> @Test
> public void testCreatePerson() throws Exception {
> peopleManager.createPerson ( "Franck", "Mosse", 40);
> }
>
> }
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month
[JBoss JIRA] Commented: (JBWS-2575) Client received com.sun.xml.ws.streaming.XMLStreamReaderException when invoking WebService annotated with OneWay
by Alessio Soldano (JIRA)
[ https://jira.jboss.org/jira/browse/JBWS-2575?page=com.atlassian.jira.plug... ]
Alessio Soldano commented on JBWS-2575:
---------------------------------------
Please post to the user forum providing more information: I assume you're using the native stack that comes with AS 5.0.0.GA, is that right? Are you using Metro on client side? Please follow-up on a new user forum thread and link it here.
> Client received com.sun.xml.ws.streaming.XMLStreamReaderException when invoking WebService annotated with OneWay
> ----------------------------------------------------------------------------------------------------------------
>
> Key: JBWS-2575
> URL: https://jira.jboss.org/jira/browse/JBWS-2575
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Environment: JBoss 5.0.0 under Windows XP
> wsdl and stub generated using jax-ws tools
> Reporter: Mosse Franck
> Assignee: Alessio Soldano
>
> A standalone client receives an exception when it tries to invoke a web service annotated with @OneWay.
> The exception received on the client side is :
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:242)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:70)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:85)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:75)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:167)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:149)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:121)
> at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:280)
> at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:158)
> at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
> at com.sun.xml.ws.client.Stub.process(Stub.java:235)
> at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
> at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
> at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
> at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
> at $Proxy30.createPerson(Unknown Source)
> at test.example1.TestPeopleManager.testCreatePerson(TestPeopleManager.java:41)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
> at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)
> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
> at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:56)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:51)
> ... 39 more
> The code of the web service is :
> package test.example1;
> import javax.ejb.Stateless;
> import javax.jws.Oneway;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> @WebService( name="PeopleManager", serviceName="PeopleManager", targetNamespace="http://techtip.com/samples/example1")
> @Stateless
> public class PeopleManager {
> @WebMethod( operationName="createPerson")
> @Oneway
> public void createPerson ( @WebParam(name="firstName") String firstName, @WebParam(name="lastName")String lastName, @WebParam(name="age") int age)
> {
> System.out.println ("Creating person [firstName=" + firstName + "; lastName=" + lastName + ";age=" + age + "]");
> }
> }
> Remark : If the @OneWay annotation is removed, the invocation from the client is successful.
> The code of the client is :
> package test.example1;
> import java.net.MalformedURLException;
> import java.net.URL;
> import javax.xml.namespace.QName;
> import org.junit.BeforeClass;
> import org.junit.Test;
> import test.example1.generated.*;
> public class TestPeopleManager {
>
> private static PeopleManager peopleManager;
> private static final String HOST_NAME = "localhost";
> private static final String PORT_NUMBER = "8080";
> private static final String TARGET_NAMESPACE = "http://techtip.com/samples/example1";
>
> @BeforeClass
> public static void beforeClass () throws MalformedURLException
> {
> String wsdlUrl = "http://" + HOST_NAME + ":" + PORT_NUMBER + "/TestWebService/PeopleManager?wsdl";
> URL wsdlLocation = new URL( wsdlUrl);
> QName serviceName = new QName(
> TARGET_NAMESPACE,
> "PeopleManager"
> );
>
> PeopleManager_Service service = new PeopleManager_Service(
> wsdlLocation, serviceName
> );
>
> peopleManager = service.getPeopleManagerPort ();
>
> }
> @Test
> public void testCreatePerson() throws Exception {
> peopleManager.createPerson ( "Franck", "Mosse", 40);
> }
>
> }
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month
[JBoss JIRA] Updated: (JBWS-2575) Client received com.sun.xml.ws.streaming.XMLStreamReaderException when invoking WebService annotated with OneWay
by Alessio Soldano (JIRA)
[ https://jira.jboss.org/jira/browse/JBWS-2575?page=com.atlassian.jira.plug... ]
Alessio Soldano updated JBWS-2575:
----------------------------------
Assignee: (was: Alessio Soldano)
> Client received com.sun.xml.ws.streaming.XMLStreamReaderException when invoking WebService annotated with OneWay
> ----------------------------------------------------------------------------------------------------------------
>
> Key: JBWS-2575
> URL: https://jira.jboss.org/jira/browse/JBWS-2575
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Environment: JBoss 5.0.0 under Windows XP
> wsdl and stub generated using jax-ws tools
> Reporter: Mosse Franck
>
> A standalone client receives an exception when it tries to invoke a web service annotated with @OneWay.
> The exception received on the client side is :
> com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:242)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:70)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:85)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:75)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:167)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:149)
> at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:121)
> at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:280)
> at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:158)
> at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
> at com.sun.xml.ws.client.Stub.process(Stub.java:235)
> at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
> at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
> at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
> at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
> at $Proxy30.createPerson(Unknown Source)
> at test.example1.TestPeopleManager.testCreatePerson(TestPeopleManager.java:41)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
> at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)
> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
> at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:56)
> at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:51)
> ... 39 more
> The code of the web service is :
> package test.example1;
> import javax.ejb.Stateless;
> import javax.jws.Oneway;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> @WebService( name="PeopleManager", serviceName="PeopleManager", targetNamespace="http://techtip.com/samples/example1")
> @Stateless
> public class PeopleManager {
> @WebMethod( operationName="createPerson")
> @Oneway
> public void createPerson ( @WebParam(name="firstName") String firstName, @WebParam(name="lastName")String lastName, @WebParam(name="age") int age)
> {
> System.out.println ("Creating person [firstName=" + firstName + "; lastName=" + lastName + ";age=" + age + "]");
> }
> }
> Remark : If the @OneWay annotation is removed, the invocation from the client is successful.
> The code of the client is :
> package test.example1;
> import java.net.MalformedURLException;
> import java.net.URL;
> import javax.xml.namespace.QName;
> import org.junit.BeforeClass;
> import org.junit.Test;
> import test.example1.generated.*;
> public class TestPeopleManager {
>
> private static PeopleManager peopleManager;
> private static final String HOST_NAME = "localhost";
> private static final String PORT_NUMBER = "8080";
> private static final String TARGET_NAMESPACE = "http://techtip.com/samples/example1";
>
> @BeforeClass
> public static void beforeClass () throws MalformedURLException
> {
> String wsdlUrl = "http://" + HOST_NAME + ":" + PORT_NUMBER + "/TestWebService/PeopleManager?wsdl";
> URL wsdlLocation = new URL( wsdlUrl);
> QName serviceName = new QName(
> TARGET_NAMESPACE,
> "PeopleManager"
> );
>
> PeopleManager_Service service = new PeopleManager_Service(
> wsdlLocation, serviceName
> );
>
> peopleManager = service.getPeopleManagerPort ();
>
> }
> @Test
> public void testCreatePerson() throws Exception {
> peopleManager.createPerson ( "Franck", "Mosse", 40);
> }
>
> }
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month
[JBoss JIRA] Created: (JBWS-2333) Refactor ArchiveDeployerHook.getWebservicesMetaData() to Separate Deployer
by Richard Opalka (JIRA)
Refactor ArchiveDeployerHook.getWebservicesMetaData() to Separate Deployer
--------------------------------------------------------------------------
Key: JBWS-2333
URL: https://jira.jboss.org/jira/browse/JBWS-2333
Project: JBoss Web Services
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: jbossws-cxf, jbossws-metro, jbossws-native
Affects Versions: jbossws-cxf-3.0.3, jbossws-metro-3.0.3, jbossws-native-3.0.3
Reporter: Richard Opalka
Assignee: Richard Opalka
Fix For: jbossws-native-3.0.4, jbossws-metro-3.0.4, jbossws-cxf-3.0.4
We do the following in <b>org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.getWebservicesMetaData(DeploymentUnit unit)</b>
<pre>
/** Unmrashall the webservices.xml if there is one
*/
protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
{
WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
if (wsMetaData == null && vfWebservices != null)
{
try
{
URL wsURL = vfWebservices.toURL();
Element root = DOMUtils.parse(wsURL.openStream());
String namespaceURI = root.getNamespaceURI();
if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
ObjectModelFactory factory = new WebservicesFactory(wsURL);
wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
unit.addAttachment(WebservicesMetaData.class, wsMetaData);
}
}
catch (Exception ex)
{
throw new WSFDeploymentException(ex);
}
}
return wsMetaData;
}
</pre>
It integrates with deployers improperly. This method should be refactored to separate deployer that does this translation job from webservices.xml -> WebservicesMetaData class
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 1 month