[jboss-user] [JBoss Web Services] New message: "[JBossWS] Unable to change virtual host of servlet-based web service"
Karl Determe
do-not-reply at jboss.com
Tue Mar 9 10:09:29 EST 2010
User development,
A new message was posted in the thread "[JBossWS] Unable to change virtual host of servlet-based web service":
http://community.jboss.org/message/530798#530798
Author : Karl Determe
Profile : http://community.jboss.org/people/determek
Message:
--------------------------------------------------------------
Hello,
I have built a top-down servlet-based web service with the JBossWS-Native 3.2.2. This web service build a PDF file and this one is defined as a "base64Binary" type and is mapped as a DataHandler:
*XSD definition*
<element name="getMap2PdfResponse">
<complexType>
<sequence>
<element name="pdffile" type="base64Binary" minOccurs="0" xmime:expectedContentTypes="application/pdf"/>
</sequence>
</complexType>
</element>
*Client proxy*:
DataHandler handler = map2Pdf.getMap2Pdf(.......)
I build a PDF file and thsi dWhen deploying it in a test JBoss environnement, the JBoss/Services console shows me its Endpoint Address like http://192.168.xx.xx/. I have tried to define a (correctly defined in the Tomcat container) virtual host with a /WEB-INF/jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<virtual-host>myserver.com</virtual-host>
</jboss-web>
I have even tried the @WebContext ( virtualHosts="myserver.com") on the implementation class but without success. More over my WSDL (located in WEB-INF/wsdl/) uses imports like <xsd:import namespace="http://localize/xsd" schemaLocation="xsd/LocalizationService.xsd"/> so imported schemas are relative to the current WSDL location.
My question is how can I force the JBoss deployer to use a virtual host for the web service endpoint and the adresses for the imported schemas into the WSDL ?
Help would be very appreciated
KDE
com.sun.xml.internal.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,204801]
Message: XML document structures must start and end within the same entity.]
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
at $Proxy33.getMap2Pdf(Unknown Source)
at client.Map2PdfClient.createPdf(Map2PdfClient.java:162)
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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
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: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,204801]
Message: XML document structures must start and end within the same entity.]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.BridgeImpl.unmarshal(Unknown Source)
at com.sun.xml.internal.bind.api.Bridge.unmarshal(Unknown Source)
at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.readResponse(Unknown Source)
... 28 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,204801]
Message: XML document structures must start and end within the same entity.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(Unknown Source)
... 32 more
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530798#530798
More information about the jboss-user
mailing list