[JBossWS] - Re: SOAPElementImpl cast excepion (JBoss 4.2 + Axis2 + JDK1.
by davidm2005
Hi,
Did you (or anyone else) ever figure out this problem? I have almost the same error message trying to do use WS-Security for encrypting and signing messages:
2008-09-11 15:02:45,968 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
java.lang.ClassCastException: org.jboss.ws.core.soap.SOAPElementImpl
at org.jboss.ws.core.soap.SOAPEnvelopeImpl.(SOAPEnvelopeImpl.java:60)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:124)
at org.…
[View More]jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:96)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:280)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:195)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:447)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
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:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175964#4175964
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175964
[View Less]
16 years, 4 months
[JBossWS] - Re: Providing your own wsdl instead of the generated one.
by sr_ren
I am using JBoss 4.3. I followed the exact steps I just got this
10:25:45,013 INFO [DefaultEndpointRegistry] register: jboss.ws:context=EchoTest,endpoint=echo
10:25:45,075 INFO [TomcatDeployer] deploy, ctxPath=/EchoTest, warUrl=.../tmp/deploy/tmp53925EchoTest-exp.war/
10:25:45,401 INFO [WSDLFilePublisher] WSDL published to: file:/C:/Program Files/JBoss/server/default/data/wsdl/EchoTest.war/EchoService.wsdl
I did not get the message regarding "ServiceEndpointDeployer". When I test my web …
[View More]service I got exception
10:27:07,011 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.IllegalStateException: Canot get target bean instance
at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.getTargetBean(DefaultInvocationHandler.java:80)
at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:90)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
...
Caused by: java.lang.InstantiationException: echo.Echo
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.getTargetBean(DefaultInvocationHandler.java:75)
I don't understand who creates this echo.Echo servlet which is mentioned in the web.xml. Any help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175930#4175930
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175930
[View Less]
16 years, 4 months
[JBossWS] - websphere swaRef/MIME interop. issue
by amashtakov
Hi Everybody,
I spent several hours while fighting with the following issue, but with
no luck:
I have to access a web service, running on websphere v6.
The web service itself uses swaRef and MIME for attachments.
Both, JBossWS and WebSphere v6 claim support for
WS-I Attachment Profile 1.0, but running wsconsume tool against
wsdl file raises the folowing error:
| [ERROR] invalid extension element: "mime:part" (in namespace http://schemas.xmlsoap.org/wsdl/mime/") unknown location
|
…
[View More]I tested this with jboss 4.2.2.GA, 4.2.3.GA and jbossws-3.0.3-native, but
the error remains. Seems, that problem is with wsdl file, but I cannot
figure out why due my limited experience with web services. Can
anybody help me this ? Any pointers will be highly appreciated.
Thank you in advance,
/Alexander
PS:
WeatherAttachment.wsdl (an example from websphere web services handbook v6)
| <?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions xmlns:impl="http://bean.itso" xmlns:intf="http://bean.itso"
| xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
| xmlns:tns2="http://objects.itso"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| targetNamespace="http://bean.itso">
| <wsdl:types>
| <schema xmlns="http://www.w3.org/2001/XMLSchema"
| targetNamespace="http://bean.itso" xmlns:impl="http://bean.itso"
| xmlns:intf="http://bean.itso" xmlns:tns2="http://objects.itso"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
| <import namespace="http://objects.itso"/>
| <import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="swaref.xsd"/>
| <element name="getDayForecast">
| <complexType>
| <sequence>
| <element name="theDate" nillable="true" type="xsd:dateTime"/>
| </sequence>
| </complexType>
| </element>
| <element name="getDayForecastResponse">
| <complexType>
| <sequence>
| <element name="getDayForecastReturn" nillable="true" type="tns2:Weather"/>
| </sequence>
| </complexType>
| </element>
| </schema>
| <schema xmlns="http://www.w3.org/2001/XMLSchema"
| targetNamespace="http://objects.itso" xmlns:impl="http://bean.itso"
| xmlns:intf="http://bean.itso"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <complexType name="Weather">
| <sequence>
| <element name="condition" nillable="true" type="xsd:string"/>
| <element name="date" nillable="true" type="xsd:dateTime"/>
| <element name="windDirection" nillable="true" type="xsd:string"/>
| <element name="windSpeed" type="xsd:int"/>
| <element name="temperatureCelsius" type="xsd:int"/>
| <element name="dbflag" type="xsd:boolean"/>
| </sequence>
| </complexType>
| </schema>
| </wsdl:types>
|
| <wsdl:message name="getDayForecastRequest">
|
| <wsdl:part element="impl:getDayForecast" name="parameters"/>
|
| </wsdl:message>
|
| <wsdl:message name="getDayForecastResponse">
|
| <wsdl:part element="impl:getDayForecastResponse" name="parameters"/>
|
| </wsdl:message>
|
| <wsdl:message name="getDayForecastImageRequest">
|
| <wsdl:part name="theDate" type="xsd:dateTime"/>
|
| <wsdl:part name="bgImage" type="xsd:hexBinary"/>
|
| </wsdl:message>
|
| <wsdl:message name="getDayForecastImageResponse">
|
| <wsdl:part name="weatherImage" type="wsi:swaRef"/>
|
| </wsdl:message>
|
| <wsdl:portType name="WeatherAttachment">
|
| <wsdl:operation name="getDayForecast">
|
| <wsdl:input message="impl:getDayForecastRequest" name="getDayForecastRequest"/>
|
| <wsdl:output message="impl:getDayForecastResponse" name="getDayForecastResponse"/>
|
| </wsdl:operation>
|
| <wsdl:operation name="getDayForecastImage">
|
| <wsdl:input message="impl:getDayForecastImageRequest" name="getDayForecastImageRequest"/>
|
| <wsdl:output message="impl:getDayForecastImageResponse" name="getDayForecastImageResponse"/>
|
| </wsdl:operation>
|
| </wsdl:portType>
|
| <wsdl:binding name="WeatherAttachmentSoapBinding" type="impl:WeatherAttachment">
|
| <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
| <wsdl:operation name="getDayForecast">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="getDayForecastRequest">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:input>
|
| <wsdl:output name="getDayForecastResponse">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:output>
|
| </wsdl:operation>
|
| <wsdl:operation name="getDayForecastImage">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="getDayForecastImageRequest">
| <mime:part>
| <wsdlsoap:body parts="theDate" use="literal"/>
| </mime:part>
| <mime:multipartRelated>
| <mime:part>
| <mime:content part="bgImage" type="image/jpeg"/>
| </mime:part>
| </mime:multipartRelated>
| </wsdl:input>
|
| <wsdl:output name="getDayForecastImageResponse">
| <mime:multipartRelated>
| <mime:part>
| <wsdlsoap:body parts="weatherImage" use="literal"/>
| </mime:part>
| </mime:multipartRelated>
| </wsdl:output>
|
| </wsdl:operation>
|
| </wsdl:binding>
|
| <wsdl:service name="WeatherAttachmentService">
|
| <wsdl:port binding="impl:WeatherAttachmentSoapBinding" name="WeatherAttachment">
|
| <wsdlsoap:address location="http://localhost:9080/WeatherAttachmentWeb/services/WeatherAttachment"/>
|
| </wsdl:port>
|
| </wsdl:service>
|
| </wsdl:definitions>
|
swaref.xsd
| <?xml version="1.0" encoding="UTF-8"?>
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd">
| <xsd:simpleType name="swaRef">
| <xsd:restriction base="xsd:anyURI"/>
| </xsd:simpleType>
| </xsd:schema>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175922#4175922
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175922
[View Less]
16 years, 4 months
[JBossWS] - Webservice impl from WSDL
by sr_ren
I have a JBoss 4.3 with "[NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)".
I am trying to implement the WSDL using "start from WSDL" approach to implement server side webservice.
First I tried using Eclipse 3.4 plugin that can generate server side code, however the deployment fails with "application.xml" not found. Also I found eclipse 3.4 webservice plugin generates buggy jaxb classes and it is unusable for complex types that uses derived types. I abandoned using Eclipse …
[View More]for webservice dev.
Then I restored to using "wsconsume" to do service side webservice development. "wsconsume" generated interface and I wrote the implementation for the interface. However I have no idea what are the things that are needed to be in the war/ear to package and in what structure (e.g META-INF/application.xml, META-INF/manifest.mf, WEB-INF/wsdl/mywsdl.wsdl).
I could not get information about what all things need to be put for packaging if I want to manually package and deploy, could anyone help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175689#4175689
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175689
[View Less]
16 years, 4 months
[JBossWS] - hlep me: Authorization EJB3 webservice client
by iloveyou0222
How to join the authorized client information
| @Stateless
| @WebService
| @RolesAllowed({"AdminUser"})
| public class SupportInterfaceBean implements SupportInterfaceBeanRemote {
|
| @EJB(beanName = "ChatContentFacade") ChatContentFacadeLocal chatContentFacadeLocal;//å¿
é为Beançæ¬å°æ¥å£,ä¸è½æ¯è¿ç¨æ¥å£
| @EJB(beanName = "ChatFacade") ChatFacadeLocal chatFacadeLocal;
|
| @WebMethod(operationName="sendMessage")
| public Boolean sendMessage(@WebParam(…
[View More]name="chatId") Integer chatId,@WebParam(name="content") String content,@WebParam(name="sndObject") String sndObject) {
| LogUtil.log("åéè天å
容æ¶æ¯", Level.INFO, null);
| ChatContent chatContent = new ChatContent();
| chatContent.setChat(chatFacadeLocal.findById(chatId));
| chatContent.setContent(content);
| chatContent.setIsRead(false);
| chatContent.setSndObject(Short.parseShort(sndObject));
| return chatContentFacadeLocal.save(chatContent);
| }
|
| @WebMethod(operationName="accessMessage")
| public List<WsChatContent> accessMessage(@WebParam(name="chatId") Integer chatId,@WebParam(name="sndObject") String sndObject) {
| LogUtil.log("è·åæå®æ¡ä»¶çè天å
容", Level.INFO, null);
| String sqlString = "select * from ChatContent model where model.isRead=0 and model.ChatID=" + chatId + " and model.sndObject='" + sndObject + "'";
| List<ChatContent> list = chatContentFacadeLocal.query(sqlString, null, null);
| List<WsChatContent> results = new ArrayList<WsChatContent>();
| for(ChatContent chatContent : list){
| WsChatContent wsObj = new WsChatContent();
| wsObj.setChatContentId(chatContent.getChatContentId());
| wsObj.setContent(chatContent.getContent());
| wsObj.setIsRead(chatContent.getIsRead());
| wsObj.setSndObject(chatContent.getSndObject().toString());
| results.add(wsObj);
| chatContent.setIsRead(true);
| chatContentFacadeLocal.update(chatContent);
| }
| return results;
| }
|
| }
|
| // TODO Auto-generated method stub
| SupportInterfaceBean proxy = new SupportInterfaceBeanService().getSupportInterfaceBeanPort();
| BindingProvider bindProvider = (BindingProvider) proxy;
| Map<String, Object> reqCtx = bindProvider.getRequestContext();
|
| //reqCtx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "/SupportInterfaceBeanService/SupportInterfaceBean");
| reqCtx.put(BindingProvider.USERNAME_PROPERTY, "lihuoming");
| reqCtx.put(BindingProvider.PASSWORD_PROPERTY, "123456");
| reqCtx.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
| System.out.println(proxy.accessMessage(1, "1"));
|
| xception in thread "main" javax.xml.ws.soap.SOAPFaultException: Authorization failure
| at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
| at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:108)
| at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
| at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
| at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
| at $Proxy34.accessMessage(Unknown Source)
| at com.ewke.ejb.ws.Test.main(Test.java:25)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175519#4175519
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175519
[View Less]
16 years, 4 months
[JBossWS] - wssecurity client threadsafety question
by KickMeToAndy
Hello,
we are using ws security (UsernameTokenProfile) with our JBoss server. The Client is a multithreaded web application. For each web service call we have to add the logged in users credentials to the webservice so we can pass the authentication at the server. The client code looks like :
| TestWebservice_Service service = new TestWebservice_Service();
| TestWebservice port = service.getPort(TestWebservice.class);
|
| ((StubExt) port).setConfigName("Standard …
[View More]WSSecurity Client");
| ((StubExt) port).setSecurityConfig("jboss-wsse-client.xml");
|
| ((BindingProvider) port).getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
| ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "user");
| ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
| "pwd");
|
I was wondering i a have to create a new port for each client call or if
it is possible to share one for all the thread, because the creation of the
port is quite expensive (and we are using spring to create the client service class). the only difference between the calls is the
different content in the RequestContext map, due to the differen users.
As far as i can tell the RequestContext is not ThreadSafe thus i have to
create a new Port for each call. can anybody confirm this ?
thanks in advance,
cheers,
andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175343#4175343
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175343
[View Less]
16 years, 4 months