Vinay Kumar T M

Greenhorn
+ Follow
since Sep 19, 2015
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Vinay Kumar T M

One more point.

When I made the WSDL as only SOAP 1.2 I got the below warning in Rational application developer 8.5

WS-I BP 1.1: (BP2402) The service does not contain any binding that users a SOAP 1.1 binding.

I dont understand what it says. Is it saying a service exposed as SOAP 1.2 should always support SOAP 1.1 ?. I tried to call the SOAP 1.2 service with SOAP 1.1 request, however I get the version mismatch.
8 years ago
Hi, I have a java class annotated with @WebServiceProvider(wsdllocation=pointing to wsdl) which implements implements Provider<Source>.

It works fine as SOAP 1.1. SOAPUI creates a SOAP 1.1 requests(soap namespace, contenttype etc) looking at the wsdl.

I changed the WSDL to soap12 namespace, bindings to soap 12, and annotated the class with @BindingType(value=SOAPBinding.SOAP12HTTP_BINDING). SOAPUI creats SOAP 1.2 requests looking at the wsdl and all works fine until now.

I changed the WSDL to have both SOAP 1.1 bindings and 1.2 bindings, and changed to the service to have two ports, pointing to 1.1 and 1.2 bindings. I removed the @BindingType annotation. The EAR file was deployed to Websphere application server 8.5.  

WSDL looks like below.



When the service is deployed, The WSDL from the link is seen as below. Meaning that , this service as soap12 is not hosted. if it was hosted the address REPLACED_BY_APP_SVR would have been resolved to endpoint. There were no errors or warning while deploying. I assume Axis2 engine has hosted this as soap1.1 service and ignored the SOAP 12 bindings in WSDL.

- <wsdl:binding name="TestBindingsoap12" type="targetns:TestPortType">
 <soap12:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="TestOperation">
 <soap12:operation soapAction="" />
- <wsdl:input>
 <soap12:body use="literal" namespace="http://danskenet.net/messages/RU/MR/Test" />
 </wsdl:input>
- <wsdl:output>
 <soap12:body use="literal" namespace="http://danskenet.net/messages/RU/MR/Test" />
 </wsdl:output>
 </wsdl:operation>
 </wsdl:binding>
- <wsdl:service name="TestRARUServiceV01">
- <wsdl:port name="TestRARUServiceV01Port" binding="targetns:TestBinding">
 <soap:address location="http://we7300.danskenet.net:9080/services/RU/MR/Test/TestRARUServiceV01/WebService" />
 </wsdl:port>
- <wsdl:port name="TestRARUServiceV01Portsoap12" binding="targetns:TestBindingsoap12">
 <soap12:address location="REPLACED_BY_APP_SVR" />
 </wsdl:port>
 </wsdl:service>
 </wsdl:definitions>



I added the annotation @BindingType(value=SOAPBinding.SOAP12HTTP_BINDING) and tried to deploy. While deploying I get the below error.

JAX-WS Service Descriptions could not be correctly built because of the following error: javax.xml.ws.WebServiceException: The ServiceDescription failed to validate due to the following errors -- Validation Phase 2 failure:  :: Endpoint failed validation ::  :: There is a mismatch between the wsdl and annotation information.  Please make sure both use the same binding namespace.  The wsdl is [SOAP 1.1 HTTP Binding]namespace = {http://schemas.xmlsoap.org/wsdl/soap/}.  The annotation is [SOAP 1.2 HTTP Binding]namespace = {http://www.w3.org/2003/05/soap/bindings/HTTP/}., Failing composite: org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite@91c33343



WSDL has both SOAP 1.1 and 1.2 binding but the web service engine complain about this. I'm I doing something wrong here ?. Or, is it not possible to expose this class as both Soap 1.1 and 1.2 service ?. (If yes, is this limitation only in bottom up approach ?).

Please help me with your knowledge. Thanks in advance.
8 years ago

Try performing a database operation which is not valid like inserting some data into a non-existent column. I guess you should get a SQLException.



Thats the purpose of SQLException right ?. ofcourse, it should throw if we try to do invalid things. My question is not about doing invalid things. It is about the behaviour which is contradicting the oracle documentation. I might be very much , wrong...

So please help me understand.
OCP test do have this question in scope. It says, SQLException will be thrown if we try to commit or rollback when the connection is in auto-commit mode. I could not re create this scenario.

even some of the sample questions says, SQLException will be thrown.

To my understanding, it should throw SQLException. is it wrong ?
Hi,

This query is related to JDBC Transaction.(java.sql.Connection)

I am using DB2 for z/OS.

As per the documentation, commit() or rollback() on Connection instance should throw SQLException if the Connection is under auto-commit mode. I have tried to test this, I do not get the exception.
Is it vendor- dependent ?



I get the below output.

true
rows updated: 3
Thanks  so silly, i posted it here
Hi,

I was expecting to see the value of 198 in the below code. (99+99).  Since we are sending the same object to two different threads, the instance variable is shared. So, when the second thread starts, it should pick the variable total from 99 instead of zero, isn't it right ?

Thanks for the quick answer. Sorry, I used the term JVM. I meant to say Compiler.

Wouldn't compiler detecting this doesnt make sense as well ?

Thanks,
Vinay
Hi,

I am not able to understand why the current thread goes into deadlock ?.  The current thread name is main. To my knowledge, when join on current thread(which is the same main) is issued, main waits for main to complete ? so, it goes in deadlock ?. The execution never completes. why wouldn't the JVM cant figure out that it is hogging itself ?

I tried to make it a Daemon, but I get illegalThreadStateException. Is that becuase the main thread is already in RUNNING status and it is too late to be changed to Daemon ?.

Hi,

My bad. I think I have overlooked it. Thanks for the help.

I see the correct output.


Hi,

Just started learning Threads for my certification but my curiosity drove me beyond certificaton objectives.

I tried to find the Thread class source code but could not fully understand.

in my PSVM(test class - public static class void main) method, I am coding the below code (where class B extends Thead)
B b = new B("b");
Compiler forces me to use the below constructor
B(String s) {} //It does not force me to pass s to the super constructor

My question is

super() statement is added by default, when we inherit. I also know there is a no-arg constructo in Thread class, so compiler wont complain. So, all Ok, untill now.
but how does b.getName() returns "b" ?
Constructor of B don't even pass "b" to super class, so super class dont know anything about the name "b", so it returns "Thread-0" in my JVM implementation.  
However, If I add super(s) statement inside B's constructor, I get the name displayed as b.

I am new to java, but I am missing some fundamentals here. Please help me.

b.getName() for sure refers to the method in Thread class (as B extends Thread, and class B has not overridden getName() method). at somepoint later, If I execute the statment, b.getName(), I get "b". I actually expect "Thread-0". I am wondering, how did the name instance b is aware of his name "b".  (in otherwords how was the name passed  up in the hierarchy in constructors).

This is interesting topic to me, but I might not be clear. So, to be clear, I paste my playing code here, so you get a picture of me. I have lot of commented code, so please bear with me