Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Wb Moore

Greenhorn
+ Follow
since Sep 13, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Wb Moore

Additional info:
When I open the weblogic console, and go to deployments, click on the plus (+) next to myApplication, I see both services as web applications: t_ctt and t_conversion. When I click on t_ctt, and then click on the monitoring tab, I see a line for this service:
/t_ctt myApplication myApplicationServer Active 1 TCTT.war 3 0 0 0

When I click on the testing tab, I see the service with a plus + beside it. When I click on the plus, I see:
t_ctt
/t_ctt/TCTT ?WSDL WSDL page on server myAppServer
default http://xxx.xxx.xxx.xxx:7330/t_ctt Default url on server myAppServer

But when I do the same for the other service (t_conversion), I don't see anything, either on the monotor tab or the testing tab.

6 years ago
I have a series of web services I had running in WL10 and Java 1.6, but after moving to WL12 and Java 1.7, only the WSDL for one service is displayed, instead of for all the services.

I thought the fact that the one which was displayed might have something to do with the fact that it was the last target in the build.xml, but moving it didn't change anything. I DID add the includeantruntime flag, but nothing changed when I set it to false or to true.

my build.xml has a series of targets, one for each service, like this:


This is the target which creates the ear file:


This is what the service java files look like:


That creates a WSDL file and displays it:
http://myhost.mycompany.com:7330/t_ctt/TCTT?WSDL


But I do the same thing with different services, and nothing is displayed at the URL for those services. Each service has its own war file and they are jarred into an ear file.
When I look in the console, the CTT service has a test point with a link to test the service, but the other services do not. When I look in the war files for the various services, there is a wsdl file for each service.

This is an example of one service which is not displaying the WSDL:
build.xml:


This is the java source for one service which does not work:



And when I go to the WSDL URL ( http://myhost.mycompany.com:7330/t_conversion/TConversion?WSDL ), I get Error 404 - Not Found.


Any idea what I need to do so all my services will display the wsdl's via the browser?
6 years ago
We have an weblogic server written using webligc 8.1. We are moving to using weblogic 10.3.

We have request/reply objects which are in packages with mixed case (upper and lower case letters in the package names, My.Package.MyClass) as opposed to lowercase only (as suggested by oracle). So we're trying to figure out how to build the server ear file and the client jar using weblogic 10.3 instead of the 8.1 without having to change to all lowercase package names for the request/reply objects, in part to be able to support our existing clients without having to force them all to change at a specific time (this would be almost impossible).

Is there any way to use java data types which are not generated by the clientgen with weblogic 10.3?

In weblogic 8.1, you used to be able to use the parameter useServerTypes="True". Is there a way to do this in weblogic 10.3?

Thanks,
Walter
7 years ago
I am unable to make my EJBs timeout with a remote-client-timeout. What am I missing or doing wrong?

I dont think the trans-attribute has an effect on it, but I have tried setting it to NotSupported, Supported, Required....

Here are my ejb-jar.xml and weblogic-ejb-jar.xml files:


<!--
$Source: ejb-jar.xml $
$Revision: 1.14 $
$Author: me $
$Date: 2011/07/19 $

DESCRIPTION:
This file is a deployment decriptor used by my application.

-->
<ejb-jar>
<enterprise-beans>
<!-- EJBS WITH ONLY REMOTE INTERFACES -->
<session>
<ejb-name>MyRemoteInterfaceEJB</ejb-name>
<home>MyPackage.api.MyRemoteInterfaceHome</home>
<remote>MyPackage.api.MyRemoteInterfaceRemote</remote>
<ejb-class>MyPackage.api.MyRemoteInterfaceEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/UserProfile</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.UserProfileLocalHome</local-home>
<local>MyPackage.UserProfileLocal</local>
<ejb-link>UserProfileEJB</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/MyFirst</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.MySecondPackage.MyFirstLocalHome</local-home>
<local>MyPackage.MySecondPackage.MyFirstLocal</local>
<ejb-link>MyFirstEJB</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/Common</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.CommonLocalHome</local-home>
<local>MyPackage.CommonLocal</local>
<ejb-link>CommonEJB</ejb-link>
</ejb-local-ref>
</session>
<!-- EJBS WITH ONLY LOCAL INTERFACES -->
<session>
<ejb-name>BillingEJB</ejb-name>
<local-home>MyPackage.BillingLocalHome</local-home>
<local>MyPackage.BillingLocal</local>
<ejb-class>MyPackage.BillingEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/Billing</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.BillingLocalHome</local-home>
<local>MyPackage.BillingLocal</local>
<ejb-link>BillingEJB</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/UserProfile</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.UserProfileLocalHome</local-home>
<local>MyPackage.UserProfileLocal</local>
<ejb-link>UserProfileEJB</ejb-link>
</ejb-local-ref>
</session>
<session>
<ejb-name>UserProfileEJB</ejb-name>
<local-home>MyPackage.UserProfileLocalHome</local-home>
<local>MyPackage.UserProfileLocal</local>
<ejb-class>MyPackage.UserProfileEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/Billing</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.BillingLocalHome</local-home>
<local>MyPackage.BillingLocal</local>
<ejb-link>BillingEJB</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/UserProfile</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.UserProfileLocalHome</local-home>
<local>MyPackage.UserProfileLocal</local>
<ejb-link>UserProfileEJB</ejb-link>
</ejb-local-ref>
</session>
<session>
<ejb-name>MyFirstEJB</ejb-name>
<local-home>MyPackage.MySecondPackage.MyFirstLocalHome</local-home>
<local>MyPackage.MySecondPackage.MyFirstLocal</local>
<ejb-class>MyPackage.MySecondPackage.MyFirstEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/MyFirst</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.MySecondPackage.MyFirstLocalHome</local-home>
<local>MyPackage.MySecondPackage.MyFirstLocal</local>
<ejb-link>MyFirstEJB</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/UserProfile</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.UserProfileLocalHome</local-home>
<local>MyPackage.UserProfileLocal</local>
<ejb-link>UserProfileEJB</ejb-link>
</ejb-local-ref>
</session>
<session>
<ejb-name>CommonEJB</ejb-name>
<local-home>MyPackage.CommonLocalHome</local-home>
<local>MyPackage.CommonLocal</local>
<ejb-class>MyPackage.CommonEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/MyFirst</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>MyPackage.MySecondPackage.MyFirstLocalHome</local-home>
<local>MyPackage.MySecondPackage.MyFirstLocal</local>
<ejb-link>MyFirstEJB</ejb-link>
</ejb-local-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<!-- EJBS WITH ONLY REMOTE INTERFACES -->

<container-transaction>
<method>
<ejb-name>MyRemoteInterfaceEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<!-- EJBS WITH ONLY LOCAL INTERFACES -->
<container-transaction>
<method>
<ejb-name>BillingEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>UserProfileEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>MyFirstEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>CommonEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>




<weblogic-ejb-jar>
<!-- EJBS WITH ONLY REMOTE INTERFACES -->
<weblogic-enterprise-bean>
<ejb-name>MyRemoteInterfaceEJB</ejb-name>
<transaction-descriptor>
<trans-timeout-seconds>1</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>MyRemote</jndi-name>
<remote-client-timeout>1</remote-client-timeout>
</weblogic-enterprise-bean>
!-- EJBS WITH ONLY LOCAL INTERFACES -->
<weblogic-enterprise-bean>
<ejb-name>BillingEJB</ejb-name>
<local-jndi-name>Billing</local-jndi-name>
<enable-call-by-reference>True</enable-call-by-reference>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>UserProfileEJB</ejb-name>
<local-jndi-name>UserProfile</local-jndi-name>
<enable-call-by-reference>True</enable-call-by-reference>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>DocDeterminationEJB</ejb-name>
<local-jndi-name>DocDetermination</local-jndi-name>
<enable-call-by-reference>True</enable-call-by-reference>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>CommonEJB</ejb-name>
<local-jndi-name>Common</local-jndi-name>
<enable-call-by-reference>True</enable-call-by-reference>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

greg stark wrote:
is incorrect usage for two reasons. It 1) assumes the default SecureRandom algorithm will not change and 2) assumes that the supplied seed material is the only source of seed material. This is the likely source of your issues.

2. Using any functionality directly from sun.misc is a bug. Those classes are not for use by programmers. They can be removed at any time or may not even be present on other Java runtimes. And even if the functionality remains it might be renamed. Why shouldn't Oracle rename these class oracle.misc.*?

3. Never use the no-args versions of String.getBytes() and new String(...). The default charset is different on different platforms, so this is just asking for more bugs.



Yes, I noticed that SecureRandom call also (this is inherited code). After further testing determined that is the problem.
I expect to be able to replace this method in the future, but that would entail much more than simply getting this to work.

Thank you for your assitance.
10 years ago
This code works in Java 1.4.2, but it throws "javax.crypto.BadPaddingException: Given final block not properly padded" exception in Java 1.6.

What has changed?


When it tries to decrypt, it throws the exception at the c.doFinal for the decryption (ie. "decryptedbytes = c.doFinal(decodedbytes);").

As I have said, it works fine in Java 1.4.2, but fails in Java 1.6.

Any suggestions to what I am doing wrong?

Please dont suggest the need to move to 3DES. I am aware of the need. I am not able to do so at the moment. There are plans for moving to a stronger encryption scheme. But right now, I need to get this working.

thanks!
10 years ago
Hi,

I'm using autotype to gernerate non-builtin data types, and clientgen to generate the stubs needed to access my web service. Everything works fine, except There are certain characters that I am getting in the SOAP envelop, that when converted to the Java data type, get converted incorrectly.

���123.20 is getting converted to �123.20

I've tried setting the charset on the server as well as forcing it in the client to be UTF-8:
Stub stub = (Stub) myWS;
BindingInfo info =(BindingInfo)stub._getProperty("weblogic.webservice.bindinginfo" );
info.setVerbose( true );
info.setCharset( "UTF-8" );
info.setAcceptCharset( "UTF-8" );
returnTO = myWS.getMyData(myTO);

I can see the server sends the correct text, the soap message received has the correct text, but what I see in the returnTO is not correct.

any ideas how to get the correct data from the soap message into the Transfer Object?

thanks
Walter Moore
14 years ago
Hi, I'm having a problem with characters not being returned from the weblogic web service correctly. I'm using weblogic 8.1 sp4.

On the server, (before its sent back), I have this:
���123.20

When I get it on the client, I have this:
?123.20

I have tried building my web-services.xml file so it has the correct character set:
==========
<target name="generate.webservices.xml">
<source2wsdd
javaSource="${src}/${meta.home}/api/MyEJB.java"
ejbLink="${ejbcompiled.jarname}#MyEJB"
ddFile="${build}/WEB-INF/web-services.xml"
typesInfo="${build}/types.xml"
serviceURI="/My"
sourcePath="{build}" />
<replace file="${build}/WEB-INF/web-services.xml">
<replacetoken>web-service </replacetoken>
<replacevalue>web-service charset="ISO-8859-1" </replacevalue>
</replace>
</target>
========

so the web-services.xml looks like:
========
<web-services>
<web-service charset="ISO-8859-1" name="MyEJB"
targetNamespace="http://tempuri.org/"
uri="/My">
. . .
</web-services>
=====

But its still not working.
What am I doing wrong?
14 years ago

Originally posted by Joseph Sweet:
Hi Friends,

I am wondering if there is a reliable way to get the current Class name and Method name.



The only time I want the current class name and method name is when I want to include it in a log.
This is what I have done (its not original, nor is it cheap, because of the Exception):

Then I can use something like:


hope that helps.
[ October 04, 2007: Message edited by: Walter Moore ]
14 years ago
ok, I found the error. I needed an application.xml describing the ear file:



and I needed to add a target in build.xml to put the application.xml into the appropriate dir:

[ September 14, 2007: Message edited by: Walter Moore ]
14 years ago
I'm having a problem using clientgen. It complains that it can not find 'ejbjar'.
This is the actual error:


am using weblogic 8.1 sp3. java 1.4.2_12
Here is the weblogic-ejb-jar.xml:


Here is the ejb-jar.xml:


Here are the relevant build.xml targets:


this is the error I am getting:


what is causing this? I can find no reference to this problem anywhere.

help!
thanks,
Walter
14 years ago