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

I have a test of resilience4j.circuitbreaker.CircuitBreaker
Runs fine but the state done changed from closed after 10 times, its run 15 times and allways closed.
Can anyone see what its wrong, I think its something about the supplier.



Kind regards
Frank
1 week ago

Ron McLeod wrote:Even though you see Exporting all customer to SOLR berefore return response ... in the log, it doesn't mean that the client was still connected when that occurred.

How long does it take to execute exportAllDeleteData() and exportAddAllData()?  Could it be that the client side is only willing to wait up to 30 seconds for a response and bailed before your processing has had a chance to complete?



The program runs for 45 seconds,  you are absolutely right, that was the problem, I owe you a beer, thank you very much for giving yourself time to answer, you are my hero :-)
4 months ago

Himai Minh wrote:Hi, Frank,
one thing you can try is to put this property in your application.properties under the resources folder of your project:

Then,you can see what information is printed out on the console when you run the code.
It is better to see if there is any exception thrown from the output console.



I allready have log info on the test server. :-)
4 months ago

Ron McLeod wrote:Even though you see Exporting all customer to SOLR berefore return response ... in the log, it doesn't mean that the client was still connected when that occurred.

How long does it take to execute exportAllDeleteData() and exportAddAllData()?  Could it be that the client side is only willing to wait up to 30 seconds for a response and bailed before your processing has had a chance to complete?



Yehh maybe is returning HTML , becouse the client timeouts, while the server still is running the code, i will create some loginfo in the morning, to see if it takes over 30 seconds.
4 months ago
No there is nothing between the request and the server , and i runs thru all the code , without an exception in the log .
I get.the error after exactly 30 seconds



4 months ago
When I call this rest api , i get HTML back, no errors , nothing is thrown, its going thru all my code and logs this line.
logger.info("Exporting all customer to SOLR berefore return response: ." + exportAddCustomers) ;
Just before returning the response.
Its newer catch an exception so this is newer logged:
logger.info("Exporting all customer to SOLR Exception: ." +  e.getMessage() + " " + e.getCause()) ;

But what I get back from swagger is plain html.
What can actual be wrong here, I have googled for 3 Hours and can not find any explanation , can you ?  I will give you a beer ;-)



Response from swagger:



Kind regards Frank

4 months ago

Thanks for the input, can see what you mean, and you are absolutely right :-)

//Frank
6 months ago

I have a projekt like this:


Persistence
 + src
  + main
    + Java


Services
 + src
  + main
    + Java

There is a build gradle file in the service part, and when i generete, the target dir is src/generated-sources/jaxb, under Services, but i want it to output in Persistence, what is the correct syntax for this ?

I have tried:
      def jaxbTargetDir = file("Persistance/src/generated-sources/jaxb")
      def jaxbTargetDir = file("*/Persistance")
-     def jaxbTargetDir = file("**/Persistance")
      def jaxbTargetDir = file("persistance/src/main/java/com/jysk/customermasterdata/persistence/model")



task jaxb {
       System.setProperty('javax.xml.accessExternalSchema', 'all')
       def jaxbTargetDir = file("src/generated-sources/jaxb")
       doLast {
           jaxbTargetDir.mkdirs()
           ant.taskdef(
                   name: 'xjc',
                   classname: 'com.sun.tools.xjc.XJCTask',
                   classpath: configurations.jaxb.asPath
           )
           ant.jaxbTargetDir = jaxbTargetDir
           ant.xjc(
                   destdir: '${jaxbTargetDir}',
                   package: 'com.jysk.customermasterdata.services.salesforce',
                   schema: 'src/main/resources/workflowOutboundMessage.wsdl',
                   language: 'WSDL'
           )
       }
   }

   compileJava.dependsOn jaxb

7 months ago
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  
3 years ago
THANKS ... IT WORKS
6 years ago

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







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

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

Becouse i still want that the webservice is under "bankconnect" or ?
6 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



6 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
7 years ago