SOAP Web Service Client conflcts with xfire - soap

I generated wsdl using wsimport from JDK 1.6. I then wrote a client to invoke the web service I got the following error.
java.lang.IllegalStateException: Could not initialize Service.
at org.codehaus.xfire.jaxws.ServiceDelegate.<init>(ServiceDelegate.java:77)
at org.codehaus.xfire.jaxws.Provider.createServiceDelegate(Provider.java:32)
at javax.xml.ws.Service.<init>(Service.java:56)
Then I removed xfire-all 1.2.6 jar used in my
application and found it working but only if the class was invoked from command line and not from application functionality which is the real need as removing xfire jar is not an option for me..Please help I read numberyyy of posts but did not get any fruitful solution yet.
Thanks in advance

Related

toy web service on Eclipse- trouble with glassfish4 server

I am new to Java EE, and am trying to learn how to create a web service. I followed the instructions given at this link- http://www.eclipse.org/webtools/community/education/web/t320/Implementing_a_Simple_Web_Service.pdf to create a simple Hello World web service. I got into trouble when trying to get Eclipse to start the glassfish4 server. I get the error shown below-
I am not sure what ${sunappserver.rootdirectory} means and how it is defined. Much appreciate anyone who can help me understand this and get it working.
Check your glassfish installation. This file contains lots of configuration details. Your Exception means it is missing! Maybe there is a backup called domain.xml.bak in the same directory.
Mine is in /usr/local/glassfish4_1/glassfish/domains/domain1/config/domain.xml

Unable to Integrating WSO2 Identity Server with Liferay for Authentication

I am trying to work out Liferay Authentication using wso2 Identity Server, I am using liferay 6.2 and Wso2 IS 5.0.0, I am following above link https://docs.wso2.com/display/IS500/Integrating+WSO2+Identity+Server+with+Liferay Accordingly I have created portal-ext.properties file under liferay_home/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties. and added following properties in it:
auth.pipeline.pre=org.wso2.liferay.is.authenticator.WSO2ISAuthenticator
auth.pipeline.enable.liferay.check=false
but when I run liferay portal and try to log in I am getting java.lang.ClassNotFoundException: org.wso2.liferay.is.authenticator.WSO2ISAuthenticator It should be in org.wso2.liferay.xacml.connector.jar but i am not getting this jar any where I tried to find out this class in other jars but unable to find it, I also tries to google it but no success, Please help me out with this problem, Thanks
You can follow the instructions in http://blog.facilelogin.com/2012/10/integrating-wso2-identity-server-with.html. You can find the missing jars from https://svn.wso2.org/repos/wso2/people/prabath/liferay.

Soap web service client

We are integrating our software with another company using a webservice. They created a SOAP web service which we now need to test.
I'm trying to write a java program with Eclipse IDE. When creating a web service client, I enter the wsdl:
[https://xxxxxxxxx/xxxxxxx/index.php/gt/property/soap?wsdl]*
but I keep getting a message that states: The service definition is invalid.
Any ideas as to why this would be or any links I could check out would be appreciated. I have searched but haven't found anything that helped me yet.
Thanks!
If you are going for a Java program you could use,
Web service client given WSDL
But if you just want to test the web service, you could always use program like SoapUI

Unable to create Web Service Client from WSDL URL in NetBeans

I'm trying to create a Web Service Client using the option WSDL URL in NetBeans IDE 7.0. Unfortunately, it is not able to create one and is failing with the following error:
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
After seeing this error message, I even confirmed whether saxon9-dom.jar is added to the Libraries in NetBeans. Yes, it is already available. I don't know why still the error is appearing. Can somebody let me know what is going wrong?
I'm trying to create web service client for this WSDL. I'm choosing JAX-WS Style in Client Style option while creating New Web Service Client in NetBeans.
UPDATE:
After googling, I read about some clues from the following 2 places:
1) http://www.mail-archive.com/fop-dev#xmlgraphics.apache.org/msg09659.html
This is due to the new event-handling framework that has been added
after 0.95. The step in the build process that generates the resource
files for the various messages, seems to require a writable DOM
implementation.
As the message indicates, Saxon offers such an implementation in a
separate JAR, which needs to be added to the classpath when building
FOP Trunk.
2) http://xmlbeans.apache.org/sourceAndBinaries/index.html
Using XPath/XQuery requires an additional download of
saxonb9-0-0-4j.zip and placing on the classpath of the files
saxon9.jar and saxon9-dom.jar that it contains. The zip is available
here. We cannot distribute this zip in a binary distribution due to
licensing issues.
So, I thought of changing saxon9-dom.jar in the classpath. I was using saxon9-dom.jar from saxonb9-1-0-8j.zip before, but when I tried to include saxon9-dom.jar available in saxonb9-0-0-8j.zip, now this error has disappeared and am getting a different error now as shown below. Any ideas/clues?
Web Services are described using WSDL files, so in order to create a Web Consumer for them you'll have to specify the WSDL url.
You can obtain it by adding ?WSDL ar the and of the url.
For example:
CrudService.asmx becomes
CrudService.asmx?WSDL
(It you have tested your web service and it appears ?Tester at the end, just replace it with ?WSDL).

WebServiceexception "No Content-type in the header" when trying to consume JBoss hosted webservice with a console application

I have a small assignment where I have to consume a webservice hosted with JBoss using a console application.
I have 2 projects in the same workspace, The DynamicWebApplication that I used as a webservice that is hosted using JBoss and a console application to access it. The console application also has the java files generated with wsimport
I am using the Eclipse IDE and whilst searching through the internet I found that I needed to copy the libraries found in JBOSS_HOME/common/lib to JBOSS_HOME/lib/endorsed but I still have the issue. Any ideas on why this is occurring?
PS. These are the libraries that I copied:
jbossws-native-jaxrpc.jar
jbossws-native-jaxws.jar
jbossws-native-jaxws-ext.jar
jbossws-native-saaj.jar
Ok I found the solution the the problem. Apparently I had to add the following code in the vm arguements:
-Djava.endorsed.dirs=/path-to/jboss-5.1.0.GA/lib/endorsed