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

JAXB and JAXWS

$
0
0

Hi

I am using JAXB and JAXWS for XML. I receive only payload through JAXWS and get object tree fine.

I need to have the soap header and therefore I need to change to receive the whole soap message and marshall parts of it to get object tree. Which is not working as expected.

What binding framework is JAXWS using? Is it using JAXB or something else? If it uses JAXB, are there any configuration applied?

My schemas are using substitutionGroups and that is where the problem seems to lay.

BR
Lulseged


jax-ws-commons 2.3.1 ETA?

Long Terms Rental In Jordan

$
0
0

Montecar com being the best service provider of Car Rentals in UAE is committed to provide the best cars; no matter you are here to spend your holidays or for your business trip, you can get the most luxurious and outstanding vehicles at the most nominal rates. Long Terms Rental In Jordan

How to customize the JAXWS mapping of an SOAP operation whose name is reserved in Java

$
0
0

I'm trying to compile a wsdl from a partner with JAX-WS 2.2.6 embedded in GlassFish 3.1.2.2 and get the following compilation error:

 [wsimport] [ERROR] Invalid operation "Void", it's java reserved word, can't generate java method. Use customization to change the operation name.

So I tried to map this operation name to another Java method name via a custom JAXWS binding file:

<?xml version="1.0" encoding="utf-8"?>
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                wsdlLocation="https://partner.com/BasicOperationsService?wsdl">

  <jaxws:bindings node="wsdl:definitions/wsdl:binding[@name='BasicHttpBinding_BasicOperations']/wsdl:operation[@name='Void']">
    <jaxws:method name="voidTx"/>
  </jaxws:bindings->

</jaxws:bindings>

but it doesn't seem to recognize this method element:

 [wsimport] [ERROR] invalid extension element: "jaxws:method" (in namespace "http://java.sun.com/xml/ns/jaxws")

I'm a bit at loss as this is the correct namespace and is exactly as documented in section 9.2.7.1 of https://jax-ws.java.net/nonav/2.2.6/docs/ch03.html#standard-customizations

It's not an xpath issue as if I alter the node, then I get another error that the "XPath evaluation results in an empty target node".

Any idea? Thanks!

JAX-RS - Returning a Response containing an InputStream. Who closes it?

$
0
0

Hello,

I wrote a get method that returns an inputstream. This all works but I never call the close() method on the stream. I can't call the close() operation because then the data isn't received on the client. Fortify scan's (a code quality tool) has a problem with this however and thus also my superiors.

So I was wondering if this is ok, to return an inputstream like this (I don't know another way and I find similar code on the internet), or should I do this another way (this is actually part of a WEBDEV implementation that sends a file to the client)?
I suspect that some JAX-RS component closes the inputstream afterwards but I don't have any proof for this, is this the case and where can I find it in the documentation if it is?

@GET
@Produces("application/octet-stream")
public javax.ws.rs.core.Response get() {
if (!resource.exists()) {
return javax.ws.rs.core.Response.status(404).build();
} else {
ResponseBuilder builder = javax.ws.rs.core.Response.ok();
InputStream in;
try {
in = new BufferedInputStream(new FileInputStream(resource), BUFFER_SIZE);
} catch (FileNotFoundException e) {
return javax.ws.rs.core.Response.serverError().build();
}
builder.header("Last-Modified", new Rfc1123DateFormat().format(new Date(resource.lastModified())));
builder.header("Content-Length", resource.length());

return builder.entity(in).build();
}
}

Gamma Knife Amman

$
0
0

Drsamaha com is located in Amman it is the leading and simply the best clinic that is renowned all over for its excellent and world class Gamma Knife, AVM Surgery and various other treatments. Gamma Knife Amman

Handling/catching exceptions of JAX-WS's internal code.

$
0
0

Does anybody know how to subscribe/handle/catch/be informed about exceptions that happen behind my own code? It's related mostly to those exceptions that cause delivery failures.
For example SocketTimeoutException or OutOfMemoryError on outgoing/response SOAP message. Such exceptions can happen after @WebMethod code is done, and delivery procedure is left to the JAX-WS engine.
It would be perfect to be at least somehow informed about those. Standard output/error are not an option here.

/Daniel

Change in behavior w/r/t @PostConstruct between Metro 2.2 and Metro 2.3- thinking it's a bug?

$
0
0

Hi,

I was under the impresion that the JAX-WS @PostConstruct annotation was a way of getting an initialization routine in one's web service to run one time...and only one time. This jives with my experience writing Metro web services based on Metro releases 1.5, 2.0, 2.1 and 2.2.

Imagine my surprise when I took my webservice code and without changing my source code at all, slipped in the Metro 2.3 runtime. Suddenly my @PostContruct init method is running twice! This is not what I want at all!

My research tells me Metro 2.3 is using the JAX-WS 2.2.8 RI whereas Metro 2.2, where things still work as expected, is using JAX-WS 2.2.6.5. Is this a bug in the Metro 2.3 Implementation? I saw a Glassfish bug about multiple calls to @PostConstruct methods, and while it didn't quite look like my setup, I am suspicious.

------------------

Platform specs:

I am deploying in a Tomcat 6.0.24 container
Using OpenJDK 1.7.0.25
Linux RHEL6

I walked through the code as best I could and I can see the first and second invocation of the @PostContruct method is happening inside the implementation of com.sun.xml.ws.api.server.WSEndpoint.create. I'm still honing in on this, but the older JAXWS 2.2.6 class has a create method that looks like this

public static WSEndpoint create(
@NotNull Class implType,
boolean processHandlerAnnotation,
@Nullable Invoker invoker,
@Nullable QName serviceName,
@Nullable QName portName,
@Nullable Container container,
@Nullable WSBinding binding,
@Nullable SDDocumentSource primaryWsdl,
@Nullable Collection<? extends SDDocumentSource> metadata,
@Nullable EntityResolver resolver,
boolean isTransportSynchronous,
boolean isStandard)
{
final WSEndpoint endpoint =
EndpointFactory.createEndpoint(
implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);

final Iterator managementFactories = ServiceFinder.find(ManagedEndpointFactory.class).iterator();
if (managementFactories.hasNext()) {
final ManagedEndpointFactory managementFactory = managementFactories.next();
final EndpointCreationAttributes attributes = new EndpointCreationAttributes(
processHandlerAnnotation, invoker, resolver, isTransportSynchronous);
return managementFactory.createEndpoint(endpoint, attributes);
}

return endpoint;
}

where as the newer, duplicating 2.2.8 class has this method with extra stuff concerning EndpointAwareTubes (yeesh)
public static WSEndpoint create(
@NotNull Class implType,
boolean processHandlerAnnotation,
@Nullable Invoker invoker,
@Nullable QName serviceName,
@Nullable QName portName,
@Nullable Container container,
@Nullable WSBinding binding,
@Nullable SDDocumentSource primaryWsdl,
@Nullable Collection<? extends SDDocumentSource> metadata,
@Nullable EntityResolver resolver,
boolean isTransportSynchronous,
boolean isStandard)
{
final WSEndpoint endpoint =
EndpointFactory.createEndpoint(
implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);

final Iterator managementFactories = ServiceFinder.find(ManagedEndpointFactory.class).iterator();
if (managementFactories.hasNext()) {
final ManagedEndpointFactory managementFactory = managementFactories.next();
final EndpointCreationAttributes attributes = new EndpointCreationAttributes(
processHandlerAnnotation, invoker, resolver, isTransportSynchronous);

WSEndpoint managedEndpoint = managementFactory.createEndpoint(endpoint, attributes);

if (endpoint.getAssemblerContext().getTerminalTube() instanceof EndpointAwareTube) {
((EndpointAwareTube)endpoint.getAssemblerContext().getTerminalTube()).setEndpoint(managedEndpoint);
}

return managedEndpoint;
}

return endpoint;
}

The second call to my @PostConstruct method happen inside the setEndpoint call on the EndpointAwareTube. Tubes...NOOOOO :-)

--------------

Thanks in advance for any clarification as to bug...or (sigh) new feature.


Packaging Service Interface and Exception of WSDL with JAXB Binding

$
0
0

Hi,

I'm trying to customize package swhere the service interface and the exceptions of WSDL are generated under using an external JAXB binding document. I'm doing this via wsimport 2.2.4 (and 2.1), but regardless of my binding, it places them in the (reversed) default namespace of WSDL. However, using a customized JAXB binding file(s), the schemas (XSD's) do get placed in the correct packages. Here are my WSDL and external JAXB binding file:

(As I said, the schema bindings work, but the service and exception binding in the WSDL do not)

<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
             version="2.1">

    <jaxb:bindings schemaLocation="MyType.xsd">
      <jaxb:schemaBindings>
        <jaxb:package name="my.namespace.mytype" />
      </jaxb:schemaBindings>
    </jaxb:bindings>

    <jaxb:bindings schemaLocation="MyOtherType.xsd">
      <jaxb:schemaBindings>
        <jaxb:package name="my.namespace.myothertype" />
      </jaxb:schemaBindings>
    </jaxb:bindings>

    <jaxws:bindings wsdlLocation="MyService.wsdl"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
        <jaxws:bindings
        node="wsdl:definitions/wsdl:service[@name='MyService']">
            <jaxws:package name="com.myservice.service" />
        </jaxws:bindings>
    </jaxws:bindings>   

    <jaxws:bindings wsdlLocation="MyService.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
        <jaxws:bindings
        node="wsdl:definitions/wsdl:portType[@name='MyService']/wsdl:operation[@name='getMyService']/wsdl:fault[@name='fault']">
            <jaxws:package name="com.myservice.exception" />
        </jaxws:bindings>
    </jaxws:bindings>

</jaxb:bindings>

And the WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions        name="MyService"
          targetNamespace="http://my.namespace"
               xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                xmlns:tns="http://my.namespace"
               xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <wsdl:types>
      <xsd:schema targetNamespace="http://my.namespace"
                   xmlns:Q1="http://my.namespace.myothertype">

      <xsd:include schemaLocation="MyType.xsd"></xsd:include>
      <xsd:import schemaLocation="MyOtherType.xsd"
                 namespace="http://my.namespace.myothertype"/>
      <xsd:import schemaLocation="MyFault.xsd"
                 namespace="http://my.namespace.myfault"/>
      <!-- ... -->
      </xsd:schema>
    </wsdl:types>

     <!-- messages and operations -->

  <wsdl:portType name="MyService">

<wsdl:operation name="getMyService">
<wsdl:input message="tns:getMyServiceRequest"></wsdl:input>
<wsdl:output message="tns:getMyServiceResponse"></wsdl:output>
        <wsdl:fault name="fault" message="tns:ServiceFault"></wsdl:fault>
    </wsdl:operation>

  </wsdl:portType>


  <wsdl:service name="MyService">
    <wsdl:port binding="tns:MyServiceSOAP" name="MyServiceSOAP">
      <soap:address location="http://localhost:9080/services/MyService"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

This would place the XSD types that are imported/included in the WSDL under "my.namespace.mytype" and "my.namespace.myothertype" accordingly. However, the exception (ServiceFault) and the service interface (and the implementation respectively) are generated under "namespace.my" (the WSDL's reversed default namespace) rather than "com.myservice.service" and "com.myservice.exception".

I am running the wsimport with the following (all the files are in the same directory: WSDL, XSD's, and JAXB binding documents; MyService.wsdl, MyType.xsd, MyOtherType.xsd, MyFault.xsd (which contains schema for the fault details), MyBinding.xml, ServiceFaultBinding.xml (a binding to place MyFault.xsd type in its own package, which, like other XSD's, do get placed in the correct package)):

C:\>wsimport MyService.wsdl -b MyBinding.xml -b ServiceFaultBinding.xml -s .\

Using jaxb2-basics plugin with XJC and generateCode method

$
0
0

Hi,

does anyone has an example about applying jaxb2-basics plugin in order to generate hashcode and equals methods into java generated classes.

I'm abble to use maven plugin to do that but i miss a piece of code to build the plugin array to pass to the method
JCodeModel jCodeModel = model.generateCode(Plugin[] arg0, ErrorListener arg1);

Thanks for your help

Validation of self signed certificate failed

$
0
0

Hi everybody

first i'm gonna explain my problem

i have Metro- WS(java) publish on a tomcat server, and in another project(java) i have the client that consume it, everything works fine..... the thing is, that i have to develop another client in C# to consume the same WS(java)...... i already achieve that the C# client make the call to the method, and i can see in the console of my eclipse that i´m receiving the call, but i get the next exception:

ADVERTENCIA: WSS1541: Could not locate TrustStore, check TrustStore assertion in WSIT configuration
oct 30, 2013 5:04:23 PM com.sun.xml.wss.impl.misc.DefaultCallbackHandler$X509CertificateValidatorImpl validate
GRAVE: WSS1533: fallo en la validación del certificado autofirmado.
oct 30, 2013 5:04:23 PM com.sun.xml.wss.jaxws.impl.SecurityServerTube processRequest
GRAVE: WSSTUBE0025: error al verificar la seguridad del mensaje entrante.
com.sun.xml.wss.impl.WssSoapFaultException: Validation of self signed certificate failed

on my client project in java i have the wsit.xml file taht contains the path to the truststore.jks....

location="c:\llaves5\wsTrustStore.jks" storepass="passstore"
peeralias="certificadoPub" />

but i don´t know how to tell the c# client where to find the truststore.jks

can you point me where to programmatically set the trustStore.jks path so the C# client can find it.

thanks in advance

Moving Along Lines

Preview For

Next Update

Is it possible to use custom HTTP client with JAX-WS RI?

$
0
0

Hi,
We've a requirement to monitor some Web service metrics like average response time (and many more) through JMX. The plan is to decorate the Apache HTTP Client to provide the monitoring feature. However, I don't see any way to replace the HttpURLConnection implementation used by JAX-WS RI with my own. The class of interest seems to be HttpClientTransport but even I subclass it, the framework doesn't provide a hook to plugin my custom class.
What happened to the open-closed principle? Any ideas are welcome.


Issues on Weblogic 12 metro deployment in documentation

$
0
0

There are some issues at point 2.9.1. WebLogic 12 (https://metro.java.net/guide/ch02.html#weblogic-10) . We develop on Weblogic 12.1.2, and we've the the next classloader configuration for succes deployment in weblogic-application.xml file:

<prefer-application-packages>
        <package-name>com.ctc.*</package-name>
        <package-name>com.oracle.webservices.api.*</package-name>
        <package-name>com.sun.xml.*</package-name>
        <package-name>com.sun.istack.*</package-name>
        <package-name>com.sun.msv.datatype.*</package-name>
        <package-name>com.sun.msv.driver.*</package-name>
        <package-name>com.sun.msv.grammar.*</package-name>
        <package-name>com.sun.msv.reader.*</package-name>
        <package-name>com.sun.msv.relaxns.*</package-name>
        <package-name>com.sun.msv.scanner.*</package-name>
        <package-name>com.sun.msv.util.*</package-name>
        <package-name>com.sun.msv.verifier.*</package-name>
        <package-name>com.sun.msv.writer.*</package-name>
        <package-name>com.sun.org.apache.xml.internal.*</package-name>
        <package-name>com.sun.wsit.*</package-name>
        <package-name>javax.jws.*</package-name>
        <package-name>javax.xml.activation.*</package-name>
        <package-name>javax.xml.annotation.*</package-name>
        <package-name>javax.xml.bind.*</package-name>
        <package-name>javax.xml.mail.*</package-name>
        <package-name>javax.xml.registry.*</package-name>
        <package-name>javax.xml.rpc.*</package-name>
        <package-name>javax.xml.security.*</package-name>
        <package-name>javax.xml.soap.*</package-name>
        <package-name>javax.xml.stream.*</package-name>
        <package-name>javax.xml.ws.*</package-name>
        <package-name>javanet.staxutils.*</package-name>
        <package-name>jp.gr.xml.*</package-name>
        <package-name>org.codehaus.stax2.*</package-name>
        <package-name>org.glassfish.gmbal.*</package-name>
        <package-name>org.iso_relax.*</package-name>
        <package-name>org.jcp.xml.dsig.*</package-name>
        <package-name>org.jvnet.*</package-name>
        <package-name>org.relaxng.*</package-name>
</prefer-application-packages>

<prefer-application-resources>
        <resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
        <resource-name>META-INF/services/javax.xml.ws.*</resource-name>
        <resource-name>META-INF/services/com.sun.xml.ws.*</resource-name>
        <resource-name>META-INF/services/com.sun.tools.ws.*</resource-name>
</prefer-application-resources>

We add:

<package-name>com.oracle.webservices.api.*</package-name>

and

<resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>

We remove

<package-name>javax.xml.crypto.*</package-name>

CXF-Metro WS-SecureConversation Interop issue (CXF client to Metro service)

$
0
0

Hello,
After running the Metro (v2.2.1) WS-SecureConversation sample (in samples/wssc folder) successfully, I tried to replace the Metro client with a CXF (v2.7.8) client, and got the error down below on the service side. Please find the following in attachment:
- debug logs from Metro with the requests/responses.
- the Metro service war to be deployed in Glassfish/Tomcat with Metro libraries (generated/deployed from the sample's ant task) for convenience. I changed the Basic256 assertions to Basic128 in the wsdl (compared to original sample).
I can also send the CXF client part as maven project if necessary.

The first phase (over SSL) for bootstrapping the secure conversation goes fine, the SCT is successfully issued by the Metro service to the client after usernameToken authentication. The issue occurs when Metro receives the service request from CXF with the SCT previously established, apparently related to the verification of the signature on the timestamp. From the logs, the computed digest seems correct. So the issue may be related to something else like the key derivation or other difference in algorithm implementation between client and service. I would need some help finding the root cause.
Has anybody tried this use case before?

Thanks for your help.

Regards,
Cyril

--EXCEPTION ON METRO SERVICE--
Using configured PlainTextPasswordValidator................
context.isExpired >>> false
Dec 19, 2013 2:24:47 AM com.sun.xml.ws.security.opt.impl.incoming.Signature process
SEVERE: WSS1710: Signature Verification for Signature with ID SIG-4 failed
Dec 19, 2013 2:24:47 AM com.sun.xml.wss.jaxws.impl.SecurityServerTube processRequest
SEVERE: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
com.sun.xml.wss.impl.WssSoapFaultException: Invalid Security Header
at com.sun.xml.ws.security.opt.impl.util.SOAPUtil.newSOAPFaultException(SOAPUtil.java:159)
at com.sun.xml.ws.security.opt.impl.incoming.Signature.process(Signature.java:351)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.handleSecurityHeader(Security
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.cacheHeaders(SecurityRecipien
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecip
at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.verifyInboundMessage(SecurityTubeBase.java:45
at com.sun.xml.wss.jaxws.impl.SecurityServerTube.processRequest(SecurityServerTube.java:295)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1063)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:979)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:950)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:825)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:380)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:651)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:264)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:218)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:159)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:194
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

AttachmentSize
cxf-client-metro-wssc-test.zip40.19 KB

Exception in time of generating client from Dot Net web service using wsimport

$
0
0

Hi All,
I've a problem with an unresolved xs:schema.
I tried Vivek Pandey's solution.
http://weblogs.java.net/blog/vivekp/archive/2007/05/how_to_deal_wit_1.html

After following his direction , now I'm not getting the unresolved xs:schema error anymore ,though below exceptions are coming in time of generating the client. Please help.

Exception in thread "main" com.sun.xml.internal.ws.streaming.XMLReaderException:
Unable to create StAX reader or writer
at com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory.create(X
MLStreamReaderFactory.java:134)
at com.sun.tools.internal.ws.wscompile.WsimportOptions.parseBindings(Wsi
mportOptions.java:415)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.jav
a:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:41)
Caused by: java.net.UnknownHostException: www.w3.org
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.(HttpClient.java:227)
at sun.net.www.http.HttpClient.New(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:970)

Exception in time of generating client from Dot Net web service using wsimport

$
0
0

Hi All,
I've a problem with an unresolved xs:schema.
I tried Vivek Pandey's solution.
http://weblogs.java.net/blog/vivekp/archive/2007/05/how_to_deal_wit_1.html

After following his direction , now I'm not getting the unresolved xs:schema error anymore ,though below exceptions are coming in time of generating the client. Please help.

Exception in thread "main" com.sun.xml.internal.ws.streaming.XMLReaderException:
Unable to create StAX reader or writer
at com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory.create(X
MLStreamReaderFactory.java:134)
at com.sun.tools.internal.ws.wscompile.WsimportOptions.parseBindings(Wsi
mportOptions.java:415)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.jav
a:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:41)
Caused by: java.net.UnknownHostException: www.w3.org
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.(HttpClient.java:227)
at sun.net.www.http.HttpClient.New(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:970)

extends javax.swing.JComponent

$
0
0

I try to extend the JComponent class without including it in the xml.
The binding of XML in my classes works fine but when I add "extends JComponent" I get the error "4 counts of IllegalAnnotationExceptions" ...
I found a way to extend a class by adding the annotation "XmlTransient" but I can not add it to the JComponent class.

Does anyone have a solution?
Thank you in advance for your answers.

Viewing all 171 articles
Browse latest View live