[JBossWS] - Re: Not getting instance of Service object from a WSDL file.
by PeterJ
1) As I indicated, the list of JARs I gave is for 5.0 CR2. I provided the list mainly to say that you will probably need to add a lot of JARs and your list will most likely be different from mine. What I did was used wsrunclient and when it gave a ClassNotFoundEsxception, I found the JAR containing that class, added it to my classpath, and then ran it again. I did this about a dozen times to find all of the required JARs. You can do the same. You do not need to install anything different, the JBossWS provided with 4.2.x will work just fine. (Actually, what I cannot figure out is why wsrunclient does not already include all of the necessary JAR files - that was what the whole point of that script was.)
2) Most likely you are using the wrong names or making the wrong calls. Use wsconsume to generate the stubs and examine the source for the stubs. That should tell you what names you should be using or calls you should be making.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179600#4179600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179600
16 years
[JBossWS] - JbossWS from ip address to host name
by jopersson
Hi,
Running Swing client endorsed from Jboss-4.2.3-GA release with JbossWS (native) it works fine when using server ip adderss :
POST /KService HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset=UTF-8
JBoss-Remoting-Version: 22
User-Agent: JBossRemoting - 2.2.2.SP8
Host: 192.168.0.1:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 749
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header><wsse:Security env:mustUnderstand='1'
xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext...'
xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...'>
<wsse:UsernameToken wsu:Id='token-1-1222785111445-30332961'>
<wsse:Username>0121020USR</wsse:Username>
<wsse:Password
Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext...'>12345</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body><ns1:getuserinfo xmlns:ns1="http://ws.server.k.s/">
<arg0>0121020USR</arg0>
<arg1>12345aa</arg1></ns1:getuserinfo></env:Body></env:Envelope>
When trying to switch to host name getting Exception:
2008-09-30 16:07:42,682 WARN [org.jboss.ws.core.client.HTTPRemotingConnection] - Ignore 'javax.xml.ws.security.auth.password' with auth typy: org.jboss.ws.authType.wsse
2008-09-30 16:07:42,682 WARN [org.jboss.ws.core.client.HTTPRemotingConnection] - Ignore 'javax.xml.ws.security.auth.username' with auth typy: org.jboss.ws.authType.wsse
2008-09-30 16:07:47,823 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] - SOAP request exception
java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:255)
at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
at $Proxy18.login(Unknown Source)
at se.k.client.delegate.services.kiservice.KWS.login(KIServiceWS.java:112)
at se.k.client.controller.LoginController.verifyLogin(LoginController.java:49)
at se.k.client.main.Login$2.actionPerformed(Login.java:118)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicRootPaneUI.java:191)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2926)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2918)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
at java.awt.Component.processEvent(Component.java:5818)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:697)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:962)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:834)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661)
at java.awt.Component.dispatchEventImpl(Component.java:4285)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Window.dispatchEventImpl(Window.java:2440)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
at java.awt.Dialog$1.run(Dialog.java:1045)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Connection refused: connect.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
... 49 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:277)
... 54 more
Host can be ping, DNS lookup is fine and we also edited host file in Windows system32...quite sure host name can be resolved.
Any ideas?
tia
johan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179593#4179593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179593
16 years
[JBossWS] - SOAP calls done with native stack blocked by SmartDefense fi
by maffeis
Hi
I would like to inform you of an issue I encountered while deploying JBoss and JBossWS (native) at a bank. The bank uses the SmartDefense intrusion detection system, and SmartDefense blocks SOAP calls done via the JBossWS native stack because of a "non-compliant HTTP header". The only details we could get from the intrusion detection system is that a header contains non-ascii data (our URLs, headers, payload does not contain any funny characters). Sorry but I have no further details nor dumps.
Of course that could also be a bug in the intrusion detection system, but it was not possible to overcome the issue. So I replaced the native stack by metro and the issue went away.
Not sure whether my input is valuable to the JBossWS team but I felt I should let you know of this issue, as other deployments might be affected as well.
Silvano
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179469#4179469
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179469
16 years
[JBossWS] - Re: Not getting instance of Service object from a WSDL file.
by PeterJ
Are you using wsrunclient to run your client? I have found that the wsrunclient script does not include all of the JARs needed to run a web services client. Here is how I set the classpath (this is for JBoss AS 5.0.0.CR2, the actual list might be different for 4.2.2):
## Initialize the environment:
| CLASSPATH=myclient.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-native-jaxws.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-native-core.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-native-jaxws-ext.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-spi.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-common.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-native-jaxrpc.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/activation.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jbossws-native-saaj.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/mail.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/policy.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/javassist.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar
| CLASSPATH=$CLASSPATH:$JBOSS_HOME/client/stax-api.jar
|
| ## Invoke the application, letting the user know what is being run:
| APP="$JBOSS_HOME/bin/wsrunclient.sh -classpath $CLASSPATH my.package.name.Client $*"
| echo $APP
| $APP
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179404#4179404
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179404
16 years
[JBossWS] - jboss.xml wsdl-override works with one JBoss version, but no
by jimpo
I try to override my @WebServiceRef wsdl location using jboss.xml and wsdl-location. This works fine with portal 2.6.4 which is deployed on JBossAS 4.2.1GA but override is not being done with bundled portal 2.6.6 (JBossAS 4.2.3GA).
One of my EJBs:
| @WebServiceRef(com.fooz.baz.webservice.vacationrequest.VacationRequestService_Service.class)
| private transient VacationRequestService vacationRequestService;
|
| @WebServiceRef(com.fooz.baz.webservice.employee.EmployeeService_Service.class)
| private transient EmployeeService employeeService;
jboss.xml excerpt:
<session>
| <ejb-name>ApplicationListingAction</ejb-name>
| <service-ref>
| <service-ref-name>com.fooz.baz.portlet.searchandapply.ApplicationListingAction/vacationRequestService</service-ref-name>
| <wsdl-override>http://remoteserver:8080/service/vacation?wsdl</wsdl-override>
| </service-ref>
| <service-ref>
| <service-ref-name>com.fooz.baz.portlet.searchandapply.ApplicationListingAction/employeeService</service-ref-name>
| <wsdl-override>http://remoteserver:8080/employee-service/employee?wsdl</wsdl-override>
| </service-ref>
| </session>
| </enterprise-beans>
| </jboss>
When this is deployed on JBoss4.2.1GA I see what name the servicerefs get, and am able to use the same name in jboss.xml service-ref-name:
| 14:14:13,722 INFO [EJBContainer] STARTED EJB: com.fooz.baz.portlet.freetextsearch.SearchAction ejbName: SearchAction
| 14:14:13,725 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateful.StatefulContainer
| 14:14:13,726 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=portlets.ear,jar=ejb.jar,name=ManagerApplicationEditAction,service=EJB3 with dependen
| cies:
| 14:14:13,739 INFO [ServiceRefHandlerJAXWS] setupServiceRef [jndi=/env/com.fooz.baz.portlet.manager.ManagerApplicationEditAction/vacationRequestProcess,tar
| get=com.fooz.baz.webservice.vacationrequestprocess.VacationRequestProcess]
| 14:14:13,742 INFO [ServiceRefHandlerJAXWS] setupServiceRef [jndi=/env/com.fooz.baz.portlet.manager.ManagerApplicationEditAction/employeeService,target=com
| .fooz.baz.webservice.employee.EmployeeService]
| 14:14:13,743 INFO [ServiceRefHandlerJAXWS] setupServiceRef [jndi=/env/com.fooz.baz.portlet.manager.ManagerApplicationEditAction/fortimeVacationService,tar
But none of that is displayed when I deploy on JBoss 4.2.3 GA. When I ttry to use the EJB I see that the override ("remoteserver") is not working and instead the original wsdl ("localhost") location is used:
| 14:25:38,497 INFO [STDOUT] DEBUG ApplicationListingAction.create(108) | Creating
| 14:25:38,642 WARN [ServiceDelegateImpl] Cannot access wsdlURL: http://localhost:8080/employee-service/employee?wsdl
| 14:25:38,644 WARN [ServiceDelegateImpl] Cannot get port meta data for: {http://www.ugu.fi/soa-poc/EmployeeServiceWSDL}EmployeeServiceSOAP
| 14:25:38,749 WARN [ServiceDelegateImpl] Cannot access wsdlURL: http://localhost:8080/service/vacation?wsdl
| 14:25:38,751 WARN [ServiceDelegateImpl] Cannot get port meta data for: {http://www.ugu.fi/soa-poc/VacationRequestServiceWSDL}VacationRequestServiceSOAP
| 14:25:38,917 INFO [STDOUT] DEBUG ApplicationListingAction.create(108) | Creating
| 14:25:39,001 ERROR [STDERR] 29.9.2008 14:25:38 com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/pages/apply/applicationList.xhtml]
| javax.ejb.EJBTransactionRolledbackException: org.jboss.ws.WSException: Target endpoint address not set
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
Also I think I should be able to see the webservice-ref in the JNDI using JMXConsole -> JNDIView, but neither server displays the webservice-refs there, why? How could I see which JNDI name the webservice-refs are bound to?
I have also tried adding "name" and "mappedName" attributes to the WebServiceRef annotation and using the same value as service-ref-name, without success.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179336#4179336
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179336
16 years