Quantcast
Channel: Metro and JAXB Related Items on Java.net
Viewing all 171 articles
Browse latest View live

multiple namespaces in same package

$
0
0

Hi,

I'm new to using namespaces in xml so I am kind of confused and would like some clarification. I have a java service where I am receiving xml documents with many different namespaces and while i got it working, I feel like I must have done something wrong so I want to check. In my package-info.java I have my schema annotation such as:

@javax.xml.bind.annotation.XmlSchema(xmlns={@javax.xml.bind.annotation.XmHS(prefix="train", namespaceURI="http://mycompany/train"), @javax.xml.bind.annotation.XmHS(prefix="passenger", namespaceURI="http://mycompany/passenger")}), elementFormDefault = javax.xml.bind.annotation.XmlNsForm=QUALIFIED)

I have a Train.java annotated on the class level with:
@XmlRootElement(name="Train", namespace="http://mycompany/train")

and each field in the class annotated with:
@XmlElement(name="Color") for example

Train contains a List of Passenger(s) so there's a property
private Set passengers;

and this collection is annotated with:
@XmlElementWrapper(name="Passengers")
@XmlElements(@XmlElement(name="Passenger", namespace="http://mycompany/passenger"))

Then within Passenger.java the class itself is annotated with:
@XmlElement(name="Passenger", namespace="http://mycompany/passenger")

Finally for individual fields within Passenger.java, they are annotated like this:
@XmlElement(name="TicketNumber", namespace="http://mycompany/passenger")

So when I have an xml that looks like:

<train:Train>
   <train:Color>Red</train:Color>
   <train:Passengers>
       <train:Passenger>
           <passenger:TicketNumber>T101</passenger:TicketNumber>
       </train:Passenger>
   </train:Passengers>
</train:Train>

Now I unmarshal this xml I received and Train's Color property is set and Passenger's TicketNumber property is set. But I don't know why I need to add the namespace url on the XmlElement annotation on TicketNumber for that to work but I didn't need to do so for the Color property on Train. If I remove the namespace attribute from the XmlElement annotation on TicketNumber, the value from the xml wont get mapped to the object unless I also remove the namespace prefix from the xml request. I feel like since I've got the namespace attribute defined on the XmlRootElement for Passenger, I shouldn't need to do that for every single field in the class as well just like I didn't have to for Train so I am assuming I must have setup something wrong. Can someone point me in the right direction? Thanks!

endpoints not showing in glassfish 3.1.2

$
0
0

Hello,

We are having deployment issues when going from version 3.0.1 to 3.1.2.
In 3.0.1 we have created a sun-jaxws.xml deployment descriptor and the war deployes correctly to glassfish and you can view its endpoints and wsdl and tester.
When we deploy the same war file to glassfish 3.1.2 it says that it has successfully deployed in the admin console but when clicking on the webservice there is no endpoints and I cannot manually go to the generated wsdl file.

<?xml version="1.0" encoding="UTF-8"?>


interface="com.etc....CommonInquiryWS"
implementation="com.....impl.CommonInquiryWSImpl"
url-pattern="/commonInquiryWService" />

There is no errors in the logs, the only difference is that 3.0.1 displays:
INFO: WS00018: Webservice Endpoint deployed
CommonInquiryWSImpl listening at address at http://localhost:8080/...

and 3.1.2 does not.

Has anyone come across this problem? Or know why the descriptor for 3.0.1 does not work for 3.1.2? Am i missing metadata? Do I need to make any changes to the sun-jaxws.xml file?

Thanks

URLClassloader issue in jaxws-maven-plugin

$
0
0

We have encountered a problem in wsgen involving the URLClassLoader that required us to add jars to the system endorsed directory. It would be far better to enhance the plugin to support the definition of a list of directories in pom.xml that could be used to populate java.endorsed.dirs.

SOAP over TCP

$
0
0

Today,I try to use SOAP over TCP with Metro.I follow Chapter 9 of Metro User Guide step by step,but when I run the client I get a Exception,As follows:
SEVERE: WSTCP0001:Processing message failed!
javax.xml.ws.WebServiceException: WSTCP0017:Error executing webservice
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:201)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.processRequest(TCPTransportPipe.java:113)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy38.add(Unknown Source)
at com.xxx.ws.client.Client.main(Client.java:19)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)
at com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream.read(FramedMessageInputStream.java:208)
at com.sun.xml.ws.transport.tcp.io.BufferedMessageInputStream.read(BufferedMessageInputStream.java:61)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:90)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:71)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:325)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:193)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:165)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:52)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:235)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:458)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:124)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:244)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:136)
... 12 more

Exception in thread "main" javax.xml.ws.WebServiceException: WSTCP0017:Error executing webservice
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:201)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.processRequest(TCPTransportPipe.java:113)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy38.add(Unknown Source)
at com.xxx.ws.client.Client.main(Client.java:19)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)
at com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream.read(FramedMessageInputStream.java:208)
at com.sun.xml.ws.transport.tcp.io.BufferedMessageInputStream.read(BufferedMessageInputStream.java:61)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:90)
at com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:71)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:325)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:193)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:165)
at com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:52)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:235)
at com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:458)
at com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:124)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:244)
at com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:136)
... 12 more
Java Result: 1

As the document show:I add the follow Policy to my Service EndPoint:<wsp:Policy wsu:Id="AddNumbersPortBindingPolicy"><wsp:ExactlyOne><wsp:All><tcp:OptimizedTCPTransport enabled="true"/></wsp:All></wsp:ExactlyOne></wsp:Policy>
and in order to tell my client to use Tcp to transport SOAP,I add follow Policy to my client :

<wsp:Policy wsu:Id="AddNumbersPortBindingPolicy"><wsp:ExactlyOne><wsp:All><tcp:AutomaticallySelectOptimalTransport/></wsp:All></wsp:ExactlyOne></wsp:Policy>

when I delete the policy from my client,my client can communicate with my service by http .But when I add the policy,my client become very slow and finally give me the exception.

I should modify the configuration on Glassfish?

SOAP over TCP

$
0
0

Today,I try to use SOAP over TCP with Metro.I follow
/http://metro.java.net/guide/ch09.html#soaptcpc/ Chapter 9 of Metro User
Guide step by step,but when I run the client I get a Exception,As follows:
SEVERE: WSTCP0001:Processing message failed!
javax.xml.ws.WebServiceException: WSTCP0017:Error executing webservice
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:201)
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.processRequest(TCPTransportPipe.java:113)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy38.add(Unknown Source)
at com.xxx.ws.client.Client.main(Client.java:19)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)
at
com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream.read(FramedMessageInputStream.java:208)
at
com.sun.xml.ws.transport.tcp.io.BufferedMessageInputStream.read(BufferedMessageInputStream.java:61)
at
com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:90)
at
com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:71)
at
com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:325)
at
com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:193)
at
com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:165)
at
com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:52)
at
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:235)
at
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:458)
at
com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:124)
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:244)
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:136)
... 12 more

Exception in thread "main" javax.xml.ws.WebServiceException: WSTCP0017:Error
executing webservice
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:201)
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.processRequest(TCPTransportPipe.java:113)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy38.add(Unknown Source)
at com.xxx.ws.client.Client.main(Client.java:19)
Caused by: java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:492)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:135)
at
com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream.read(FramedMessageInputStream.java:208)
at
com.sun.xml.ws.transport.tcp.io.BufferedMessageInputStream.read(BufferedMessageInputStream.java:61)
at
com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:90)
at
com.sun.xml.ws.transport.tcp.io.DataInOutUtils.readInts4(DataInOutUtils.java:71)
at
com.sun.xml.ws.transport.tcp.client.WSConnectionManager.doSendMagicAndCheckVersions(WSConnectionManager.java:325)
at
com.sun.xml.ws.transport.tcp.client.WSConnectionManager.createConnectionSession(WSConnectionManager.java:193)
at
com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:165)
at
com.sun.xml.ws.transport.tcp.util.WSTCPURI.createConnection(WSTCPURI.java:52)
at
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.tryNewConnection(OutboundConnectionCacheBlockingImpl.java:235)
at
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.get(OutboundConnectionCacheBlockingImpl.java:458)
at
com.sun.xml.ws.transport.tcp.client.WSConnectionManager.openChannel(WSConnectionManager.java:124)
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.setupClientTransport(TCPTransportPipe.java:244)
at
com.sun.xml.ws.transport.tcp.client.TCPTransportPipe.process(TCPTransportPipe.java:136)
... 12 more
Java Result: 1

I should modify the configuration on Glassfish?
Please,help me.

WS-Reliable Message with Metro

$
0
0

Hi:
I try to use Ws-Reliabile Message feature in WSIT with Metro.I just want to achieve a simple function,for example the AddNumbers sample.My Web Service Endpoint runs OK,but my client has a java.lang.NumberFormatException.My Client AddNumbers.xml as follow:
<?xml version='1.0' encoding='UTF-8'?

....



revocationEnabled="true"/>

200
10




The wsit-client.xml is created by NetBeans,I debug my client find that
CloseTimeoutClientAssertion and AckRequestIntervalClientAssertion has the same Code:
"interval = Long.parseLong(super.getAttributeValue(MILLISECONDS_ATTRIBUTE_QNAME));"
obviously CloseTimeoutClientAssertion and AckRequestIntervalClientAssertion want get the Milliseconds attribute,but netbeans doesn't create the attribute...
so I change the AddNumber.xml to:
"
",then my client runs OK.

Is this my operational error or a bug of NetBeans or Metro?

Memory bloat in Metro jax-ws client webapp on Weblogic app server - ServletInputStream buffer size 100MB?

$
0
0

Hello folks!

We have been trying to figure out why our wsimport generated Jax-ws Web Service installed on Weblogic web container runs out of memory when external client tries to connect to i. We did 10-15 simultaneous calls, only first ones being succesful. A heap dump analysis revealed that there are a dozen of weblogic.servlet.internal.ServletInputStreamImpl instances holding ~100MB byte arrays(100000000 bytes). Each byte array contains only the web service request to be sent to remote web service endpoint(aprox. 300 characters).

Eclipse-based Memory Analyzer suggests the following:

+One instance of "weblogic.servlet.internal.ServletInputStreamImpl" loaded by "sun.misc.Launcher$AppClassLoader @ 0xffffffff30418a60" occupies 100 000 672 (10,56%) bytes. The memory is accumulated in one instance of "byte[]" loaded by "".+

There are totally ten of these InputStream instances, thus leading to OutOfMemory(we are having a heap size of 1GB) ...

Could it be, that Jaxws somehow controls the buffer size and for some reason decides to reserve 100MB?

Thank's in advance for any response!

Best Regards,
Thomas Isomäki

Metro webservices security on Eclipse

$
0
0

Hi,

I want to learn Metro webservices security using Eclipse and Tomcat 7. I have done this on Nebeans. But I face problem on Eclipse because I do not know where and how should I configure X509 certificates, UsernameToken etc. For ws-profile, I generate wsdl using Netbeans and copy it in Eclipse project. But I do not know where other security settings should be confgured.

Thanks

-Charles


javax.xml.ws.Response is an interface, and JAXB can't handle interfaces.

$
0
0

Hello Everyone

I am running into a brick wall with Glassfish 3.1.2 where I get the following
this problem is related to the following location:
at javax.xml.ws.Response
at public javax.xml.ws.Response com.blah.platform.webservices.importdataservice.jaxws.ImportFileGroupsAsyncResponse._return
at com.blah.platform.webservices.importdataservice.jaxws.ImportFileGroupsAsyncResponse

at com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext(JAXBRIContextFactory.java:101)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:182)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:213)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:186)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:186)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:111)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:318)
at com.sun.xml.ws.db.DatabindingImpl.(DatabindingImpl.java:99)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:74)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:58)
at com.sun.xml.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:130)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:433)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:268)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:145)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:569)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:552)

This is an application that was on Apache Geronimo and worked fine. I placed all the WSDLs in the WSDL directory in the WEB-INF folder and I get the stack trace above. Thie thing to note is that this is an async web service and the continer is choking on the response. The services were created using apache CXF but I wouldnt think that would matter in this case. Any thoughts??

thanks

Need help: ArrayIndexOutOfBound Exception - Jaxb 2.1.13

$
0
0

Hi All,

I am facing ArrayIndex out of bound issue while marshaling a xml request. It works sometimes and sometimes it does not work and throws exception. If i am sending a single request it works but when it is running in a a part of parallel threads it throws exception.

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.xml.bind.v2.util.CollisionCheckStack.pushNocheck(CollisionCheckStack.java:121)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:487)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:315)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:96)

I am using jaxb-impl-2.1.13 for marshaling.

Thanks
Ashish

JAX-WS returns response object empty

$
0
0

Hello,

I am using JAX-WS RI 2.1.6 in JDK 6 to create soap webservice client.

Here is wsdl:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   <wsdl:definitions name="customerSearch" targetNamespace="http://customer-search-gui.ws.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://customer-search-gui.ws.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://customer-search-gui.ws.com">
   <wsdl:types>
    <xsd:schema targetNamespace="http://customer-search-gui.ws.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:element name="STATUS">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="STATUS_CODE" type="xsd:integer"/>
                    <xsd:element name="ERROR_CODE" type="xsd:string" minOccurs="0"/>
                    <xsd:element name="ERROR_DESCRIPTION" type="xsd:string" minOccurs="0"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="customer">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="firstName" type="xsd:string" nillable="true"/>
                    <xsd:element name="lastName" type="xsd:string" nillable="true"/>
                    <xsd:element name="street" type="xsd:string" nillable="true"/>
                    <xsd:element name="number" type="xsd:string" nillable="true"/>
                    <xsd:element name="city" type="xsd:string" nillable="true"/>
                    <xsd:element name="zipCode" type="xsd:string" nillable="true"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>

        <xsd:element name="customerSearchCRMRequest">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="searchCriteria">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element name="firstName" minOccurs="0" type="xsd:string"/>
                                <xsd:element name="lastName" minOccurs="0" type="xsd:string"/>
                            </xsd:sequence>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="trackingId" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="customerSearchCRMResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="customerList">
                        <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element ref="tns:customer" maxOccurs="unbounded" minOccurs="0"/>
                            </xsd:sequence>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="trackingId" type="xsd:string"/>
                    <xsd:element ref="tns:STATUS"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>        
    </xsd:schema>
</wsdl:types>
<wsdl:message name="searchCrmRequest">
    <wsdl:part name="request" element="tns:customerSearchCRMRequest"/>
</wsdl:message>
<wsdl:message name="searchCrmResponse">
    <wsdl:part name="response" element="tns:customerSearchCRMResponse"/>
</wsdl:message>
<wsdl:portType name="search">
    <wsdl:operation name="searchCrm">
        <wsdl:input message="tns:searchCrmRequest"/>
        <wsdl:output message="tns:searchCrmResponse"/>
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="searchSOAP" type="tns:search">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="searchCrm">
        <soap:operation soapAction="/searchCrm"/>
        <wsdl:input>
            <soap:body use="literal" namespace="http://customer-search-gui.ws.com"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" namespace="http://customer-search-gui.ws.com"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="customerSearch">
    <wsdl:port binding="tns:searchSOAP" name="searchSOAP">
        <soap:address location="http://192.192.192.192:10001/customSearch"/>
    </wsdl:port>
</wsdl:service>

Request:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:customerSearchCRMRequest xmlns:ns2="http://customer-search-gui.ws.com"><searchCriteria><firstName>John</firstName></searchCriteria><trackingId>track001</trackingId></ns2:customerSearchCRMRequest></S:Body></S:Envelope>

Response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><customerSearchCRMResponse xmlns="http://customer-search-gui.ws.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><customerList><customer><firstName>John</firstName><lastName>Stone</lastName></customer></customerList><trackingId>track001</trackingId><STATUS><STATUS_CODE>0</STATUS_CODE></STATUS></customerSearchCRMResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

So, like you can see there is something in response. But the problem is in java object customerSearchCRMResponse is contains no value (everything is null)!

But why, there is a response ?

And there is no error or exception throwns. Everything seems fine.

When I tried SOAP UI, everything works clear.

There is obvious problem in deserializing response.

But what can I do with that?

What and where is the problem?

Thank you

How to set Woodstox output properties ?

$
0
0

Have a plain vanilla JAX-WS RI web service.
Everything text book and everything created via annotations.

I need to have my output (my response) filter out characters that are invalid. As it turns out Woodstox has a way of doing this because you can set at runtime which InvalidCharHandler you wish to use.

There's a posting on the topic here: http://www.cowtowncoder.com/blog/archives/2008/12/entry_106.html

However I have no idea how to do this in the context of a plain vanilla web service created through annotation. For example I don't have an XMLOutputFactory anywhere. In fact the whole marshalling / unmarshalling is all behind-the-scenes from my point of view. Can't even catch if there's an exception in that process.

So how can I set such a Woodstox property ? Seems like a pretty simple thing but I just cannot figure out how to do it.

Hope you can help.

Error while doing digest verification

$
0
0

Hi
I am running jdk1.6.0_33 and metro-2.2.1-1 and in my mcs project I am getting
«WSS1717: Error occurred while doing digest verification of body/payload»
The fault rises in the StreamingPayLoadDigester.java
The calculated Digest do not match the original Digest.
This occurs when I run my JAX-WS generated client.
When I run my other client, build on some old framework (oc4j) the server accepts the signature, but the
client do not accepts the signature that the server provide.
Where should I start looking ?
Please,help me.

typesafeEnumClass dont work from binding file

Policy for the service could not be obtained

$
0
0

Hi,

I have a client, that sends SOAP messages and asked me to build a Web Service. He gave me policy file, and XSD to make web service. I used Netbeans 7.3 to build web service and deployed it on glassfish server 3.1.1.

The policy file:

<wsp:Policy wsu:Id="SignAndEncrypt"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
wsdl:required="true">
<wsp:ExactlyOne>
<wsp:All>
<sp:AsymmetricBinding>
<wsp:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic128Rsa15 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:IncludeTimestamp />
<sp:EncryptSignature />
<sp:OnlySignEntireHeadersAndBody />
<sp:Layout>
  <wsp:Policy>
   <sp:Lax/>
  </wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:Wss10>
<wsp:Policy>
<sp:MustSupportRefIssuerSerial />
</wsp:Policy>
</sp:Wss10>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
<sp:SignedParts>
<sp:Body />
<sp:Header Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing" />
</sp:SignedParts>
<sp:EncryptedParts>
<sp:Body />
</sp:EncryptedParts>
<wsam:Addressing wsp:Optional="false"/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>

<wsp:Policy wsu:Id="Addressing"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
wsdl:required="true">
<wsam:Addressing>
<wsp:Policy>
<wsam:NonAnonymousResponses />
</wsp:Policy>
</wsam:Addressing>
</wsp:Policy>

<wsp:Policy wsu:Id="AddressingAnonymous"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
wsdl:required="true">
<wsam:Addressing>
<wsp:Policy />
</wsam:Addressing>
</wsp:Policy>

In his example he uses these policy references in binding:

<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
        URI="#SignAndEncrypt"/>

<wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy"
URI="#AddressingAnonymous" />

I did the same.
I get this SOAP message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <wsse:Security soap:mustUnderstand="1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsu:Timestamp wsu:Id="TS-1609">
        <wsu:Created>2013-05-20T06:24:19.555Z</wsu:Created> 
        <wsu:Expires>2013-05-20T06:29:19.555Z</wsu:Expires>
      </wsu:Timestamp>
      <xenc:EncryptedKey Id="EK-D26BF1C9EFEFA27F4F123524879511568741" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
        <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
        <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
          <wsse:SecurityTokenReference>
            <ds:X509Data>
              <ds:X509IssuerSerial>
                <ds:X509IssuerName>...</ds:X509IssuerName>
                <ds:X509SerialNumber>...</ds:X509SerialNumber>
              </ds:X509IssuerSerial>
            </ds:X509Data>
          </wsse:SecurityTokenReference></ds:KeyInfo>
         <xenc:CipherData>
         <xenc:CipherValue>adWfIr+dsd1aGiXWFCajFKGhkr4VToEj1oIBrvz35kfsWF8YPfgpvElvAlAJylU5z0QbvJnte6JngzO9acdZTlEekE2eORxIA2HGBoj+q3i6piFV0DcDCyRHrNZtIRCYJAqUdzlv3HfzFwd5RHQstt+tyiuERSlq1Njnh/7oJrONKdEjxLYZAbsdDqsqHoBnGU1Ls2TPFkFsDik+ErvQqLB/P1S95T0UFYP78k6JVlimDwqGZwYQDzOXCckd+ddL7vmGl6TmWefTLMN9ufx+0pRfZIY0hzU+9QHn/5sjDNGWSjDDBLXEnpHibFgSpSOWC03VEYc6/tAAnM+uHpHdLw==</xenc:CipherValue>
         </xenc:CipherData>
         <xenc:ReferenceList><xenc:DataReference URI="#ED-1611"/>
           <xenc:DataReference URI="#ED-1612"/>
         </xenc:ReferenceList>
       </xenc:EncryptedKey>
       <xenc:EncryptedData Id="ED-1612" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element">
         <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
         <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
           <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey" xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
            <wsse:Reference URI="#EK-D26BF1C9EFEFA27F4F123524879511568741"/>
          </wsse:SecurityTokenReference>
        </ds:KeyInfo>
        <xenc:CipherData>
          <xenc:CipherValue>k/A3+WMQz0DNRxhcdbZBQAKUzBWYvghfuCG2DltEOQgnQQUJarkdG67HeVw0aUnAE8q51/zK+cYljX3nv1fqaEgnMDTgS6Qarsh425ROfTXdz++Eve/m6VcvspqIvuijWM6S/UDXxdZuKHtyp8/IJmtoUqK6RGPj3pqG/erwJnx5lhj1yXZkTNXQJ11Q6wIRLpdi5J6....
        </xenc:CipherValue>
      </xenc:CipherData>
    </xenc:EncryptedData>
   </wsse:Security>
  </soap:Header>
  <soap:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-1539754912">
    <xenc:EncryptedData Id="ED-1611" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Content">
      <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
      <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey" xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
          <wsse:Reference URI="#EK-D26BF1C9EFEFA27F4F123524879511568741"/>
        </wsse:SecurityTokenReference>
      </ds:KeyInfo>
      <xenc:CipherData>
        <xenc:CipherValue>XlGrCOw4tvWoi3ZqerzbvYWg/XlfLx8BrLoSSNBaizznvdKVxwYBXRTWUtLjq1E55zqDlZ79vm258yqHQ5G0WX79puIoGoQTP2KY9shFgxArYnR/AwVUZ6t9U6M5HM+YoArASW46TG5zNckAWP1hwKdiEOkKsb03soRme8bvq4mMhZYczsXwbxbf5Ia3fek4Abl0a7i7r61/CN/YIXtz8D6TJCFvIP9udEpUlXrdjhQOQOAjIMUAR5WC0UtzBcNCNcVj4ECVEKDf3QW8kCpvNaCvCIqI+sZPKp9UA2ix...
        </xenc:CipherData>
      </xenc:EncryptedData>
    </soap:Body>
  </soap:Envelope>
 

And I get this error:

[#|2013-05-20T10:39:59.176+0300|SEVERE|glassfish3.1.1|javax.enterprise.resource.xml.webservices.security|_ThreadID=20;_ThreadName=Thread-2;|Policy is null|#]

[#|2013-05-20T10:39:59.176+0300|SEVERE|glassfish3.1.1|com.sun.xml.wss.provider.wsit|_ThreadID=20;_ThreadName=Thread-2;|WSITPVD0035: Error in Verifying Security in Inbound Message.
com.sun.xml.wss.impl.PolicyViolationException: ERROR: Policy for the service could not be obtained
at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:134)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.createMessage(SecurityRecipient.java:983)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecipient.java:232)
at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.verifyInboundMessage(WSITServerAuthContext.java:586)
at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:360)
at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:263)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:173)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:144)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:314)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:608)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:162)
at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)

DisableStreamingSecurity

$
0
0

Hi.

When I include the DisableInclusivePrefixList Assertion the PrefixList disappear from the InclusiveNamespaces as expected. But when I include the DisableStreamingSecurity and the DisableInclusivePrefixList Assertions the PrefixList is present in the InclusiveNamespaces.
This is not as I expect, is this a BUG ?

Error in Jaxb binding for wsdl document

$
0
0

Hello
below is my wsdl and binding.xjb that I am using. I want to rename the "" name from 'getRelatedAssets' to 'getRelatedAssetsX'.
But when I run it i got the following error

[ERROR] compiler was unable to honor this property customization. It is attached to a wrong place, or its inconsistent with other bindings.
[ERROR] (the above customization is attached to the following location in the schema)
line 16 of file:/C:/Users/syedf/Documents/Checkers/4842/sample.wsdl

Here is my wsdl:
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://services.external.dmh.ibm.com" xmlns:intf="http://services.external.dmh.ibm.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://services.external.dmh.ibm.com" xmlns:intf="http://services.external.dmh.ibm.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">














......

and here is my binding file:

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
wsdlLocation="C:\Users\syedf\Documents\Checkers\4842\sample.wsdl">





Can anyone help me out in finding what wrong I am doing.
I appreciate.

jaxws-maven-plugin 2.2.1 seems to leave a file /tmp/jm.txt

$
0
0

Release 2.2.1 of the jaxws-maven-plugin seems to create a file /tmp/jm.txt on each run without removing it afterwards.

This causes problems if multiple users on the same machine calls this plugin.

In AbstractJaxwsMojo.java the file refernence new File(System.getProperty("java.io.tmpdir", "jm.txt") is created in the method createPathFile. The methods first tries to remove the file, but if this fails, the fact is logged, but the method continues.

I do not see anything that tries to remove the file after its use in the exec() method.

If the wsimport goal of jaxws-maven-plugin is run with one WSDL by user 'a' and then afterwards by another user 'b' for another WSDL, the file for the first user is still used, typically causing something like

[WARNING] cannot remove obsolete classpath setting file: /tmp/jm.txt
28-May-2013 10:08:57 org.jvnet.jax_ws_commons.jaxws.AbstractJaxwsMojo createPathFile
SEVERE: null
java.io.FileNotFoundException: /tmp/jm.txt (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:131)
at org.jvnet.jax_ws_commons.jaxws.AbstractJaxwsMojo.createPathFile(AbstractJaxwsMojo.java:476)
at org.jvnet.jax_ws_commons.jaxws.AbstractJaxwsMojo.exec(AbstractJaxwsMojo.java:363)
at org.jvnet.jax_ws_commons.jaxws.WsImportMojo.processLocalWsdlFiles(WsImportMojo.java:307)

Depending on the actual contents of old contents of jm.txt now being used by the plugin, this may or may not cause compilation problems later.

Other errors may happen if several invocations of the plugin are run simultaneously, even if run by the same user.

I see two problems here:
1. using a fixed filename for several invocations may cause them to mix up.
2. the file should be deleted when no longer needed.

For now, I'm reverting to release 2.2.

Cannot be cast to com.sun.xml.ws.developer.WSBindingProvider

$
0
0

I want to know if anyone figured out how to resolve this issue. I've searched on google and have not found the solution to this problem. Can anyone help me? I'm running my java program on JDK 6 and I added jaxws-rt-2.2.7.jar to my project library. When I searched for "WSBindingProvider" type on eclipse, it found the type in 2 places. One was found in jaxws-rt-2.27 jar and the other one was found in jdk160_18. Is this my problem? If so, how can I fix it?

Here's my code

URL wsdlLocation = new URL(url);
QName portName = new QName(namespace,serviceName);
UsedCarWSX_Service ws = new UsedCarWSX_Service(wsdlLocation,portName);
UsedCarWSX usedCarWSX = ws.getUsedCarWSX();

//---------Populate the UserCredentials-------
UserCredentials uc = new UserCredentials();
uc.setUserid(username);
uc.setPassword(password);
uc.setProducttype("W");
javax.xml.ws.Holder ucHolder=new Holder(uc);

String vin = vin;
BBValues vinValues = null;
CurrentVINValues cvv = null;
cvv = new CurrentVINValues();
cvv.setBFillDrilldown(true);
cvv.setBReturnAddDeducts(false);
cvv.setBReturnMileage(true);
cvv.setIAverageAddDeductAdj(0);
cvv.setICleanAddDeductAdj(0);
cvv.setIExtraCleanAddDeductAdj(0);
cvv.setIMileage(0);
cvv.setIRoughAddDeductAdj(0);
cvv.setSCountryCode("U");
cvv.setSFrequencyCode("W");
cvv.setSVIN(vin);

// ---------- Call the web service --------------
CurrentVINValuesResponse cvr = usedCarWSX.getCurrentVINValues(cvv, ucHolder);

WSBindingProvider bp=(WSBindingProvider)usedCarWSX;
List hl=bp.getInboundHeaders();
UserCredentials incomingUC = parseResponseHeader((Header)hl.get(0));

Client-Side WSIT Configuration Files

$
0
0

I wrote a metro client using Username/password credentials to access an oracle webservice. The client was generated using wsimport. I created the wsit-client.xml that imports a Service.xml file. When I run the client using a debugging, the SOAP Header is missing and the security credentials are missing:

Here is the request
java -Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true -Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true -cp .:/home/workspace/lib/metro20/*:/home/workspace/lib/thirdparty/log4j-1.2.8.jar:/home/workspace/Saip_SnapShot_Requestor/build/META-INF/wsit-client.xml edu.colorado.its.se.requestor.Saip_SimpleClient

The xml-request.txt that is being sent is attached.

You will note the wsit files are located in the META-INF directory according to the documentation. I have attached the wsit-client.xml and the appropriate parts of the Service.xml file. Any insights are appreciated. Why dont I see the message the wsit-client.xml is being loaded? I know that is part of the problem.

AttachmentSize
wsit-client.txt541 bytes
ReadCourseManagementService.txt4.82 KB
xml-request.txt573 bytes
Viewing all 171 articles
Browse latest View live