I'm using Websphere 7. Using existing WSDL, I've created WS client using wsimport ant task (com.sun.tools.ws.ant.WsImport).
Is there a way I can log SOAP xml requests/responses sent/received by this client?
Trace for SOAP WS messages can be enabled by following these steps on Websphere 7 administration console:
Go to administration console
Go to: Servers -> WebSphere application servers -> server > Change Log Detail Levels
In the package tree find the package com.ibm.ws.websvcs.trace, click on package name and choose 'All Mesasges and Traces', as result you should have log details set as below:
*=info: com.ibm.ws.websvcs.trace.*=all
Click on 'OK' and then Save the changes.
SOAP request/responses can now be found in trace.log on your appl. server.
For WebSphere Liberty Profile, logging of JAX-WS SOAP request and response messages can be enabled by adding the following trace configuration to the server.xml:
<logging traceFormat="BASIC" consoleLogLevel="INFO" traceSpecification="com.ibm.ws.jaxws.wsat.*=debug" traceFileName="stdout" />
Adding the traceFileName="stdout" attribute redirects the trace output to the console. Without this attribute it will write to the trace log file instead.
Related
How do I enable soap tracing on Liberty(19.0.0.1) that is running on IBMi (v7r2)?
I've tried adding
*=info: com.ibm.ws.websvcs.trace.*=all via HTTP admin, but no trace of any SOAP messages is found.
EDIT:
HTTP Admin (IBM Web Administrator for i) > Server Properties > Server Tracing
Yes, I've added the asterisks but I'm new here and formatting kinda crooked it :)
So there a few different ways to configure trace on Liberty, but I find adding the element to the server.xml is easiest (like one of the comments suggested). This element with the JAX-WS trace enabled on Liberty is:
<logging traceSpecification="com.ibm.ws.jaxws.*=all:org.apache.cxf.*=all"/>
This will print out lots of trace, but you can search for the SOAP Messages in the log files by searching for either/both:
Inbound Message (The Request)
Outbound Message (The Response)
The logged request/response contents will include the SOAP Message.
For more info on configuring trace on Liberty check out:
https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_logging.html
Ok, thank you very much for help.
I used Merged Trace with org.apache.cxf.*=all:com.ibm.ws.jaxws.*=all
and that worked just fine.
I followed the steps of this tutorial:
http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/ega_docs/dialog_ega.shtml#ega_getstart_setup
until the step 3h (Account validation), which leads to following error:
“Client error – 407 Proxy Authorization required”.
(I am behind a company proxy)
I use Eclipse Mars 4.5.2 and IBM Bluemix Tools 1.0.10.v20160406_1758.
What i have already done:
-Of course I have Bluemix account that works perfectly fine.
-I have filled in the HTTP and HTTPS info within the Eclipse proxy settings (General->network settings) and cleared the SOCK-field. I can therefore install new software and use the eclipse marketplace for instance.
-Set the proxy at the http_proxy/https_proxy at the Windows system variables, therefore I can use the Bluemix command line tool and login to Bluemix.
-Experimenting with adding various lines at the eclipse.ini as in the following:
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provi der.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=YYY.com
-Dhttp.proxyUser=uid123
-Dhttp.proxyPassword=XXX
-Dhttps.proxyPort=8080
-Dhttps.proxyHost=YYY.com
-Dhttps.proxyUser=uid123
-Dhttps.proxyPassword=XXX
-Dhttp.nonProxyHosts=localhost|127.0.0.1
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=3000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=3000
The command "nslookup api.ng.bluemix.net" returns:
Server: AAA.de Address: aa.bbb.cd.ef
Not authorized answer:
Name: ng.bluemix.net Address: 75.126.70.44 Aliases: api.ng.bluemix.net
Any suggestions how to successfully use the Eclipse Bluemix Plugin?
Based on the error, it looks like you have authentication error on accessing the proxy itself. The Bluemix Tools does not use the command line interface (CLI) to communicate with the Bluemix server. Therefore, proxy settings are not setup in Eclipse even if you have it working using the CLI.
In Eclipse, all the proxy settings can be done from the Preference page. There is no need to change eclipse.ini so you can restore the eclipse.ini file to the original before changing the preference setting. You can find the corresponding preference page in Window>Preferences>General>Network Connection. Then, change the "Active Provider" to "Manual" and edit the HTTP and HTTPS port proxy settings as needed.
In the Edit Proxy Entry dialog, you can input the proxy authentication information by selecting Requires Authentication checkbox and input the user/password.
I am using Eclipse Mars, Apache Tomcat, Axis2, and Maven with its axis2-java2wsdl and axis2-aar plugins to create web service and its client.
The web service is simple at the moment: it has a list of Users (with User attributes: nickname and Id) and allows someone to create, search, get and delete a user.
Everything seems to run OK on the server side. I implemented the service and tested that it works OK with SOAP UI (the functions operate as they should).
Error:
However, when I run the Java code for the client, I get the following error:
Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement {http://user.ws.soar}nickName
The problems occurs when I return a custom User object to the client.
Here is the service.xml excerpt:
<operation name="getUser" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://user.ws.soar/xsd">
<actionMapping>http://user.ws.soar/xsd/getUser</actionMapping>
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
I found a similar post but this solution did not work for me.
Any ideas how to resolve this issue are appreciated.
I have an EAR deployed on WAS 7.0.0.3 server and the web service also deployed.
MQ listener is up and running in my WAS server and corresponding MQ host, channel name and MQ queue name are configured correctly. It is the response queue.
Whenever I'm getting data from MQ, I'm getting the below error in SystemOut.log
error
"MQJCA4004: Message delivery to an MDB 'null' failed with exception:
'deactivate of endpoint is in progress.' "
Please help me on this.
I've managed to further analyze similar MQJCA4004 error using this, kinda hackish, technique.
You need a Java decompiler that preserves line numbers.
JadClipse plugin for Eclipse can do that. Just make sure you have enabled:
Debug Settings
[x] Align code for debugging
in Window > Preferences > Java > Decompiler.
The standard Intellij Idea Community decompiler has that feature already enabled.
The IBM class responsible for producing the MQJCA4004 error is
com.ibm.mq.connector.inbound.AbstractWorkImpl
When you open it (with decompilation enabled) you'll be able to find the string MQJCA4004. Place a breakpoint there and start remote debugging your application server. When you hit that breakpoint, you'll gain access to all the context information including the exception (with call stack) that's causing this error.
How can I change wluser's password?
I changed it's password, and "wl.db.password" of worklight.properties.
But both worklight console and application center didn't work.
After that ,I took back the password, then both of them work correctly.
Has anyone tried that?
※「wluser」 is db2user for worklight.
http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m5/topic/com.ibm.worklight.help.doc/admin/t_creating_the_db2_databases.html?resultof=%22%64%62%32%22%20%22%77%6c%75%73%65%72%22%20
My Environment is below.
Windows 7
Worklight V5.0.5.1
WAS V8.5
DB2 V9.7
When I changed wluser's password, I got following errors.
Worklight console
Error 500: javax.servlet.ServletException: Worklight Project not initialized
applicationcenter,
An unexpected error occurred (HTTP Status 500)
When you create a worklight.properties, you have the option to specify the database connection parameters through two means, described in http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m6/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fadmin%2Fr_ibm_worklight_database_setup.html. In order to be able to modify the password from the application server console, rather than in the worklight.properties file, you need to use the "JNDI way" of setting the database connection properties, as documented in http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m6/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fdevref%2Ft_transporting_the_app.html.
In WebSphere Application Server, you find the location to edit the DB2 password by opening the WAS administration console, then opening the "Security > Global security" page, then clicking on the "Java Authentication and Authorization Service > J2C authentication data", in the resulting list pick the "WorklightDb2DatabaseCredentials" credentials and edit them. Note that for other types of databases than DB2, the password is stored as a custom property of the datasource, rather than as JAAS authentication data.
In WebSphere Application Server Liberty profile, the password is in the server.xml file of the server, in the <dataSource jndiName="jdbc/WorklightDS"> and <dataSource jndiName="jdbc/WorklightReportsDS"> elements. Simply edit this file; Liberty will notice that it's been edited and reload it.
In Tomcat, the password is in the conf/server.xml file. Here, the password is in the <Resource name="jdbc/WorklightDS"> and <Resource name="jdbc/WorklightReportsDS"> elements. Simply edit this file, then restart the Tomcat server.