Frank Jacobsen

Ranch Hand
+ Follow
since May 17, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Frank Jacobsen

Im trying to conncet through a proxy, it Works fine when i call the url from SOAPUI, trying to get it up running in java, and i read on the internet i need a CONNECT first.

In the attached file i get NTML up running, to simulate a proxy, i can see in the log of the NTML, that the request is getting to the NTML app, but it get this error:


java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at bcaValidate.ProxyPass.<init>(ProxyPass.java:26)
at bcaValidate.ProxyPass.main(ProxyPass.java:53)

My web service is running on a websphere server.





This is the article i read on the internet:

HTTPS - CONNECT Requests
HTTPS connections make use of secure sockets (SSL). Data transferred between the client and the server is encrypted. This is widely used in the financial sector in order to ensure secure transactions, but is be-coming increasingly more widespread on the internet. However at first glance it poses a problem for proxy servers: How is the proxy to know what to do with this encrypted data coming from the client? In order to overcome this problem, initially, another type of HTTP request is made by the client, a CON-NECT request. This request is standard HTTP and thus is unencrypted and contains the address of who the client wants to create a HTTPS connection with and this can be extracted by the proxy. This is a pro-cess known as HTTP Connect Tunneling and works as follows: -Client issues a CONNECT Request -Proxy extracts the destination URL. -Proxy creates a standard socket connection to the remote server specified by the URL. -If successful, the proxy sends a ‘200 Connection Established ‘ response to the client, indi-cating that the client can now begin to transmit the encrypted data to the proxy. -The proxy then simul-taneously forwards any data sent to it from the client to the remote server, and any data received from the remote server back to the client.
All of this data will be encrypted and thus the proxy cannot cache or even interpret the data.

Can anyone help , i promise a beer  

Frank  
2 years ago
THANKS ... IT WORKS
5 years ago

This gives me a empty string, i try to get the faultstring out, how to do with xpath ?







Frank
5 years ago
Thanks for your answers, that helps me a lot

Frank
5 years ago
That means i have to deply the war file 2 times ?

Becouse i still want that the webservice is under "bankconnect" or ?
5 years ago
I have this mapping:

<servlet>
<servlet-name>wsdl</servlet-name>
<jsp-file>/wsdl/bankconnect.html</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>wsdl</servlet-name>
<url-pattern>/wsdl</url-pattern>
</servlet-mapping>

And this works fine:

http://bdaix416.bdunet.dk:9080/bankconnect/wsdl

The war file is deployed under the context root /bankconnect/

I want to make a servlet mapping, before the context root "i still want the context root bankconnect".

http://bdaix416.bdunet.dk:9080/wsdl is this possible ? and if , how to ?

Frank



5 years ago
I running on a Websphere 7.0 and i only want to protect index.html in my war file with a user and password.

What is the correct way to do this ?


Frank
6 years ago
I want to check the size of the body and header that i recieve, what is the fastet and the best way to to this ?


Frank
6 years ago
I have a servlet with these lines of code:


response.getWriter().println("Web service up and running");
RequestDispatcher rd = request.getRequestDispatcher("ping.jsp");
rd.include(request, response);


When the jsp is loaded i get "Web service up and running" in the top of my jsp.

Can i control where on the JSP i put this tekst.

I know i can be using ajax, but can i control with some javascript, or is there a other way, to control where this tekst
ends up in my jsp ?


Frank
6 years ago
Why this line return null elementsByTagNameNS.item(0).appendChild(p);
The elementsByTagNameNS isent null, but the .item(0) gives the null pointer exception.

All i want is to add add child node so before looks like "<ns2:technicalAddress><</ns2:technicalAddress>"
and after looks like "<ns2:technicalAddress><ipAddress>1.2.3.4</ipAddress></ns2:technicalAddress>"

This is copyed from production code, så i think the code is correct, but the xml isent.

Any idea whats wrong here ?






Frank
6 years ago
Maybe im on the right track, but get this exception:

[Fatal Error] :1:602: The prefix "ns2" for element "ns2:technicalAddress" is not bound.
org.xml.sax.SAXParseException: The prefix "ns2" for element "ns2:technicalAddress" is not bound.



6 years ago
My program works fine, now i want to test it, and want a result in elementsByTagNameNS.item(0)); to return something.

I try to generete the correct xml from a String but elementsByTagNameNS.item(0)); returns null.

Cann i prefix my String, so the item returns something, or how can i do that ?

FJA elementsByTagNameNS: org.apache.xerces.dom.DeepNodeListImpl@25a325a3
FJA elementsByTagNameNS: null





Frank
6 years ago
It works... BUT...

This is my namespace in the XML.


This works:


But is there a way to get the targetnamespace in java ?


Frank