Search Results

Search found 425 results on 17 pages for 'jax'.

Page 7/17 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Calling a .NET web service (WSE 3.0, WS-Security) from JAXWS-RI

    - by elduff
    I'm writing a JAXWS-RI client that must call a .NET Web Service that is using WS-Security. The service's WSDL does not contain any WS-Security info, but I have an example soap message from the service's authors and know that I must include wsse:Security headers, including X:509 tokens. I've been researching, and I've seen example of folks calling this type of web service from Axis and CXF (in conjunction with Rampart and/or WSS4J), but nothing about using plain JAXWS-RI itself. However, I'm (unfortunately) constrained to using JAXWS-RI by my gov't client. Does anyone have any examples/documentation of doing this from JAXWS-RI? I need to ultimately generate a SOAP header that looks something like the one below - this is a sample soap:header from a .NET client written by the service's authors. (Note: I've put the 'VALUE_HERE' string in places where I need to provide my own values) <soapenv:Envelope xmlns:iri="http://EOIR/IRIES" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401- wss-wssecurity-secext-1.0.xsd"> <xenc:EncryptedKey Id="VALUE_HERE"> <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <wsse:SecurityTokenReference> <wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"> VALUE_HERE </wsse:KeyIdentifier> </wsse:SecurityTokenReference> </ds:KeyInfo> <xenc:CipherData> <xenc:CipherValue>VALUE_HERE</xenc:CipherValue> </xenc:CipherData> <xenc:ReferenceList> <xenc:DataReference URI="#EncDataId-8"/> </xenc:ReferenceList> </xenc:EncryptedKey> </wsse:Security>

    Read the article

  • Java complex validation in Dropwizard?

    - by miku
    I'd like to accept JSON on an REST endpoint and convert it to the correct type for immediate validation. The endpoint looks like this: @POST public Response createCar(@Valid Car car) { // persist to DB // ... } But there are many subclasses of Car, e.g. Van, SelfDrivingCar, RaceCar, etc. How could I accept the different JSON representations on the endpoint, while keeping the validation code in the Resource as concise as something like @Valid Car car? Again: I send in JSON like (here, it's the representation of a subclass of Car, namely SelfDrivingCar): { "id" : "t1", // every Car has an Id "kind" : "selfdriving", // every Car has a type-hint "max_speed" : "200 mph", // some attribute "ai_provider" : "fastcarsai ltd." // this is SelfDrivingCar-specific } and I'd like the validation machinery look into the kind attribute, create an instance of the appropriate subclass, here e.g. SelfDrivingCar and perform validation. I know I could create different endpoints for all kind of cars, but thats does not seem DRY. And I know that I could use a real Validator instead of the annotation and do it by hand, so I'm just asking if there's some elegant shortcut for this problem.

    Read the article

  • can a valid xml body have escaped characters for the '<' and '>' around the element names

    - by prmatta
    My web service is receiving xml from a third party that looks like this: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> &lt;Foo&gt;bar&lt;/Foo&gt; </SOAP-ENV:Body> </SOAP-ENV:Envelope> My jaxws web service rejects this with a parsing error. Also if I try to validate this xml using soapui it says Body with element-only content type cannot have text element. My question is, is that xml valid? Or is the client supposed to send me something without escaping the < and . Any references to xml standards or rules are appreciated.

    Read the article

  • Redirect output logs of javax.xml.ws and com.sun.xml.ws

    - by chrisnfoneur
    I am working on a SOAP based web service, with Sun's Metro. I am facing an annoying bug, each time I send a malformed SOAP object to my web service, sun's api spam the System.out with logs like this: javax.xml.ws.WebServiceException: com.sun.istack.XMLStreamException2: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'type' must appear on element 'object'. at com.sun.xml.ws.util.pipe.AbstractSchemaValidationTube.doProcess(AbstractSchemaValidationTube.java:206) at com.sun.xml.ws.util.pipe.AbstractSchemaValidationTube.processRequest(AbstractSchemaValidationTube.java:175) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:106) at com.sun.xml.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:91) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65) at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:54) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:555) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65) at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:527) at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:119) at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:349) at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:321) at java.lang.Thread.run(Thread.java:619) Caused by: com.sun.istack.XMLStreamException2: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'type' must appear on element 'object'. at com.sun.xml.ws.util.xml.StAXSource$1.parse(StAXSource.java:185) at com.sun.xml.ws.util.xml.StAXSource$1.parse(StAXSource.java:170) at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.validate(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source) at javax.xml.validation.Validator.validate(Validator.java:127) at com.sun.xml.ws.util.pipe.AbstractSchemaValidationTube.doProcess(AbstractSchemaValidationTube.java:204) ... 20 more I would like to switch off this log or redirect it to my error/warn/debug.log files used by log4j. I tried to add a rule in my log4j.xml file : <category name="javax.xml.ws"> <priority value="error" /> </category> It didn't worked. So I tried the following trick: java.util.logging.Logger.getLogger("javax.xml.ws.WebServiceException").setLevel( java.util.logging.Level.OFF); it didn't worked neither. Any ideas ? It is not a big issue but it makes my catalina.log getting bigger & bigger and it's not the appropriate place for this kind of log. Chris

    Read the article

  • Issue with Silverlight interop with JBoss WebService

    - by Hadi Eskandari
    I have a simple JAXWS webservice deployed in JBoss. It runs fine with a java client but I'm trying to connect using a Silverlight 3.0 application. I've changed the webservice to use Soap 1.1: @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http") public class UserSessionBean implements UserSessionRemote { ... } I'm using BasicHttpBinding on the Silverlight client. There are two issues: 1- When I connect from VisualStudio (2008 and 2010) to create the webservice proxies, the following exception is thrown, but the proxy is generated successfully. This also happens when I try to update the existing web service reference (but it also updates fine). com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml; charset=utf-8 Supported ones are: [text/xml] at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291) at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128) at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287) at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276) at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at org.jboss.wsf.stack.metro.RequestHandlerImpl.doPost(RequestHandlerImpl.java:225) at org.jboss.wsf.stack.metro.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:82) at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:619) 2- When I use the proxy to fetch some data from the webservice (even methods with primitive types), I get the following error on Silverlight client: "An error occurred while trying to make a request to URI 'http://localhost:9090/admintool/UserSessionEJB'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details." Setting a breakpoint on my java code, I can see that it is not hit when I run the silverlight client, so it is probably a cross domain issue, but I'm not sure how to handle it (I've already created a crossdomain.xml file and put it beside my HTML page hosting the silverlight client). I appreciate any help!

    Read the article

  • Spring, Jersey and Viewable JSP Integration

    - by Brian D.
    I'm trying to integrate Spring 3.0.5 with Jersey 1.4. I seem to have everything working, but whenever I try and return a Viewable that points to a JSP, I get a 404 error. When I wasn't using spring I could use this filter: <filter> <filter-name>Jersey Filter</filter-name> <filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class> <init-param> <param-name>com.sun.jersey.config.feature.Redirect</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>cheetah.frontend.controllers</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name> <param-value>/(images|css|jsp)/.*</param-value> </init-param> </filter> And I could return a Viewable to any JSP's, image, css that were stored in the appropriate folder. However, now that I have to use the SpringServlet to get spring integration, I'm at a loss for how to access resources, since I can't use the filter above. I've tried using this servlet mapping with no luck: <servlet> <servlet-name>jerseyspring</servlet-name> <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> <load-on-startup>1</load-on-startup> <init-param> <param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name> <param-value>/(images|css|jsp)/.*</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>jerseyspring</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> Does anyone know the proper configurations to achieve this? Thanks for any help.

    Read the article

  • Creating a web-service client directly from the source

    - by ben
    Hi, I am trying to generate the WS client jar directly from the @Webservice class(es). Let's take this example : package com.example.maven.jaxws.helloservice; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { ; return "Hello " + param; } } I can generate a war file and use glassfish to serve this webservice, and from there I can use the glassfish WSDL URL to generate the client sources. What I am trying to do is to skip the glassfish part. From my maven project defining the webservice, I would like to use the jaxws-maven-plugin to create the client classes but I cannot find any way to specify the actual URL of the webservice. It should be possible right? @see also http://stackoverflow.com/questions/2097789/creating-a-web-service-client-with-a-known-but-inaccessible-wsdl

    Read the article

  • unable to find a MessageBodyReader

    - by Cristian Boariu
    Hi guys, I have this interface: @Path("inbox") public interface InboxQueryResourceTest { @POST @Path("{membershipExternalId}/query") @Consumes(MediaType.APPLICATION_XML) @Produces("multipart/mixed") public MultipartOutput query(@PathParam("membershipExternalId") final String membershipExternalId, @QueryParam("page") @DefaultValue("0") final int page, @QueryParam("pageSize") @DefaultValue("10") final int pageSize, @QueryParam("sortProperty") final List<String> sortPropertyList, @QueryParam("sortReversed") final List<Boolean> sortReversed, @QueryParam("sortType") final List<String> sortTypeString, final InstanceQuery instanceQuery) throws IOException; } I have implemented the method to return a MultipartOutput. I am posting an xml query from Fiddler and i receive the result without any problem. BUT i have done an integration test for the same interface, i send the same objects and i put the response like: final MultipartOutput multiPartOutput = getClient().query(getUserRestAuth(), 0, 25, null, null, null, instanceQuery); But here, so from integration tests, i receive a strange error: Unable to find a MessageBodyReader of content-type multipart/mixed;boundary="74c5b6b4-e820-452d-abea-4c56ffb514bb" and type class org.jboss.resteasy.plugins.providers.multipart.MultipartOutput Anyone has any ideea why only in integration tests i receive this error? PS: Some of you will say that i do not send application/xml as ContentType but multipart, which of course is false because the objects are annotated with the required @XmlRootElement etc, otherways neither the POST from Fiddler would work.

    Read the article

  • Invoke webservice using jaxws when the wsdl has more than one service

    - by Hugo Palma
    I'm trying to get hold of the FindService on this wsdl using jaxws. I generated the classes just fine using wsimport. But when i do: FindService findService = new FindService(); i get the exception: Exception in thread "main" javax.xml.ws.WebServiceException: {http://s.mappoint.net/mappoint-30/}FindService is not a valid service. Valid services are: {http://s.mappoint.net/mappoint-30/}CommonService So, it seems that jaxws is only finding CommonService in the wsdl which is the first one declared in it. Any idea how i can use the FindService ? Thanks.

    Read the article

  • Java EE javax.xml.bind.MarshalException

    - by sandeep
    Hi, I am getting javax.xml.bind.MarshalException error. I am sending List from my webservice to the backingbean and I have this error. WARNING: invocation error on ejb endpoint Login_webservice at /Login_webserviceService/Login_webservice : javax.xml.bind.MarshalException - with linked exception: [javax.xml.bind.JAXBException: class JPA.Cantable nor any of its super class is known to this context.] javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException - with linked exception: [javax.xml.bind.JAXBException: class JPA.Cantable nor any of its super class is known to this context.] at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:325) at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142) at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:109) at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:278) at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:380) at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:92) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:525) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143) at org.glassfish.webservices.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:116) at org.glassfish.webservices.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87) at org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:196) at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:127) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) Here is my code: Backing bean @WebServiceRef(wsdlLocation = "http://localhost:26565/Login_webserviceService/Login_webservice?WSDL") public String login() { System.out.println("Login Phase entered"); int result = 0; List list; List finalList = null; try { Weblogin.LoginWebserviceService service = new Weblogin.LoginWebserviceService(); Weblogin.LoginWebservice port = service.getLoginWebservicePort(); result = port.login(voterID, password); Weblogin.LoginWebservice port1 = service.getLoginWebservicePort(); list = port1.candDetails(1); finalList = list; this.setList(finalList); } catch (Exception e) { e.printStackTrace(); } if (result == 1) return "polling"; else return "login"; } Webservice public List candDetails(int pollEvent) { List resultList = null; List finalList = null; try { if (pollEvent == 1) { resultList = em.createNamedQuery("Cantable.findAll").getResultList(); finalList = resultList; } } catch (Exception e) { e.printStackTrace(); } return resultList; }

    Read the article

  • Metro + Jetty + OSGi = pain

    - by mjgp2
    I am trying to swap out Sun's HTTPServer for the much better Jetty server, within an OSGi bundle, running on Equinox. I have tried this: System.setProperty("com.sun.net.httpserver.HttpServerProvider","org.mortbay.jetty.j2se6.JettyHttpServerProvider"); but when endpoint.publish(url) is called, and the server is spawned, it complains of a ClassNotFoundException for org.mortbay.jetty.j2se6.JettyHttpServerProvider. However, the correct jars are in the bundle, and indeed in the Activator I can instantiate a org.mortbay.jetty.j2se6.JettyHttpServerProvider. I think that this is a some kind of classpath issue - the spawned server is in a different classpath maybe? I have tried adding the JARs in at the JDK level, but this doesn't make any difference. Can oanyone shed any light how on earth to get this working? P.S. Maybe hideous System.setProperty calls will vanish from the world one day. Hopefully :)

    Read the article

  • How to transform SoapFault to SoapMessage via Interceptor in CXF?

    - by Michal Mech
    I have web-service created and configured via Spring and CXF. See beans below: <?xml version="1.0" encoding="UTF-8"?> <beans <!-- ommited -->> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <bean id="internalActService" class="package.InternalActServiceImpl" /> <jaxws:endpoint implementor="#internalActService" address="/InternalActService"> <jaxws:properties> <entry key="schema-validation-enabled" value="true" /> </jaxws:properties> <jaxws:outFaultInterceptors> <bean class="package.InternalActServiceFaultOutInterceptor" /> </jaxws:outFaultInterceptors> </jaxws:endpoint> </beans> As can you see I added schema validation to my web service. But CXF throws SoapFault when request is not corresponding with schema. I want to send to the client SoapMessage instead of SoapFault, that's why I added outFaultInterceptors. My question is how to transform SoapFault to SoapMessage? I've made few tries but I don't know how to implement outFaultInterceptor.

    Read the article

  • xsd:datetime and XmlGregorianCalendar causes NullPointerException

    - by Draemon
    The following works: public Date getDate() { return date; } and produces something like: <date>2010-03-23T17:43:50.879Z</date> And I can use an XmlGregorianCalendar to return xsd:date or xsd:time types fine: @XmlSchemaType(name="date") public XmlGregorianCalendar getDate() { return date; } which produces something like: <date>2010-03-23</date> But trying to return xsd:datetime like so: @XmlSchemaType(name="datetime") public XmlGregorianCalendar getDate() { return date; } Causes this stack trace: java.lang.NullPointerException at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.checkXmlGregorianCalendarFieldRef(RuntimeBuiltinLeafInfoImpl.java:864) at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$200(RuntimeBuiltinLeafInfoImpl.java:111) at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$13.print(RuntimeBuiltinLeafInfoImpl.java:536) ...snip... at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Which doesn't mention my code at all. I'm using tomcat 6.0.24, java 1.6.0_16-b01

    Read the article

  • How to specify a parameter as part of every web service call?

    - by LES2
    Currently, each web service for our application has a user parameter that is added for every method. For example: @WebService public interface FooWebService { @WebMethod public Foo getFoo(@WebParam(name="alwaysHere",header=true,partName="alwaysHere") String user, @WebParam(name="fooId") Long fooId); @WebMethod public Result deletetFoo(@WebParam(name="alwaysHere",header=true,partName="alwaysHere") String user, @WebParam(name="fooId") Long fooId); // ... } There could be twenty methods in a service, each with the first parameter as user. And there could be twenty web services. We don't actually use the 'user' argument in the implementations - in fact, I don't know why it's there - but I wasn't involved in the design, and the person that put it there had a reason (I hope). Anyway, I'm trying to straighten out this Big Ball of Mud. I have already come a long way by wrapping the web services by a Spring proxy, which allows me to do some before-and-after processing in an interceptor (before there were at least 20 lines of copy-pasted boiler plate per method). I'm wondering if there's some kind of "message header" I can apply to the method or package and that can be accessed by some type of handler or something outside of each web service method. Thanks in advance for the advice, LES

    Read the article

  • How do I customise date/time bindings using JAXWS and APT?

    - by Jordan Digby
    Im using JAXWS 2.1.7, using some classes to run through JAXWS's 'apt' to generate the WSDL. For dates, I use @XmlSchemaType(name="time") private Date wakeupTime; and this generates a schema with xs:time, but when this all comes out in XML, the value is something like <wakeupTime>1901-01-01T01:00:00 +10</wakeupTime> I want JUST the time portion to come! I think I want to use a custom converter to say that xs:time + java.util.Date should be printed and parsed in such-and-sucha manner, but I cant see that I can pass a bindings file to the apt routine. I can't (for historical & other reasons) use XMLGregorianCalendar - it has to be a java.util.Date. How do I specify a custom binding for the apt tool in jaxb

    Read the article

  • how to view internal jaxws logs in tomcat

    - by prmatta
    I have a web service that is deployed in tomcat, and it is rejecting a soap request over https. However, I can't see any logs as to why it is doing so. I have the following set in my service endpoint implementation file: System.setProperty("javax.net.debug", "all"); System.setProperty("java.security.debug", "all"); And I pass the following parameters to tomcat: -Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true Is there anything else I need to do to see the internal jaxws logs? Are there some other loggers I need to enable?

    Read the article

  • Is there anyway to bring web @Context into JUnit (CXF+Spring)

    - by Sudheer
    I am trying to create unit test environment to test RESTFul services (cfx+spring) in my dev environemnt. To test RESTFul Services, I require @Context within JUnit test cases. @Context should contain HttpRequest, HttpSession, ServletContext, ServletConfig and all other webserver related information. I have setup the JUnit for the above, but when I run, @Context is coming as null. This could be because there is no webserver running and there is no @Context. I am just doubting whether there is a way to created sample web @Context and pass to JUnit. Any other ideas are welcome to bring web @Context into JUnit test cases. Thank you, Sudheer

    Read the article

  • ResourceFilterFactory and non-Path annotated Resources

    - by tousdan
    (I'm using Jersey 1.7) I am attempting to add a ResourceFilterFactory in my project to select which filters are used per method using annotations. The ResourceFilterFactory seems to be able to filters on Resources which are annotated with the Path annotation but it would seem that it does not attempt to generate filters for the methods of the SubResourceLocator of the resources that are called. @Path("a") public class A { //sub resource locator? @Path("b") public B getB() { return new B(); } @GET public void doGet() {} } public class B { @GET public void doOtherGet() { } @Path("c") public void doInner() { } } When ran, the Filter factory will only be called for the following: AbstractResourceMethod(A#doGet) AbstractSubResourceLocator(A#getB) When I expected it to be called for every method of the sub resource. I'm currently using the following options in my web.xml; <init-param> <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name> <param-value>com.my.MyResourceFilterFactory</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>com.my.resources</param-value> </init-param> Is my understanding of the filter factory flawed?

    Read the article

  • JAXWS serves only 100 requests, how to configure JAXWS to change it to unlimited?

    - by cbz
    Hello, I'm using JAXWS for generating webservices and serving using EndPoint.publish() as well as deploying war file, but as soon as it has served 100 requests it wouldn't return 101st response. How to configure JAXWS to change this count to unlimited? EDIT: solution found, first of all it was not related to JAXWS and I'm sorry for posting it here, in my first impression I thought problem is with JAXWS but after deep exploring and debugging I found problem with my persistence layer (Hibernate) where max number of sessions allowed are 100 by default. Sorry again for making you guys to think which actually does not make sense.

    Read the article

  • javax.xml.ws.soap.SOAPFaultException: Could not send Message - at JaxWsClientProxy.invoke - caused by HTTP response code: 401 for URL

    - by Mikkis
    I moved a working code from dev to test and encountered the following error(s) in test: javax.xml.ws.soap.SOAPFaultException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:143) ...... at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:472) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:302) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:123) at $Proxy739.copyIntoItems(Unknown Source) Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http:///_vti_bin/Copy.asmx at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2046) Environment specs: Java 1.6 Tomcat 6 Eclipse Helios Maven2 CXF 2.2.3 As a background work, tried to explore about the error in similar category bad URL (ruled out as i am using same URL in dev and test. and the url, userid, password are all accessible from both the machines), connection timeout( error is not 404 or it doesnt specify connection timed out... it says 401 response code for url) Checked if all the jars and same versions are included in the test environment. Can someone shed some light to understand and resolve the error? please let me know if any more details are to be included.

    Read the article

  • this implementation does not contain a WSDL definition and is not a SOAP 1.1

    - by user1635118
    I am trying to deploy a simple SOAP 1.2 web service to WebSphere v8. My service is @Stateless @WebService(serviceName = "MemberServices", portName = "MemberPort", endpointInterface = "gov.virginia.vita.edmsvc.ws.MemberWS") @BindingType(value=SOAPBinding.SOAP12HTTP_BINDING) @TransactionAttribute(TransactionAttributeType.REQUIRED) public class MemberBean implements MemberWS, MemberBeanLocal { .... } However the server is throwing the following error: "This implementation does not contain a WSDL definition and is not a SOAP 1.1 based binding. Per the JAXWS specification, a WSDL definition cannot be generated for this implementation.error" this same service deploy successfully on Glashfish and JBoss, any ideas ?

    Read the article

  • Tutorial how to create a CXF web service from existing Java code and embed it in Tomcat

    - by EugeneP
    Do you know a tutorial how to create a CXF web service from existing Java code and embed it in Tomcat, and also generate a wsdl file so that any .NET system would be able to generate client code easily? I miss that WSDL creation point in, for example this http://www.ibm.com/developerworks/library/ws-pojo-springcxf/ tutorial. No wsdl file is generated. But still it should be present in my case to provide system interoperability.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >