Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!

ryan bohnert

Greenhorn
+ Follow
since Feb 27, 2008
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 ryan bohnert

HI All,

I was trying to follow a tutorial that was put together by Koushik (Java Brains) and have an issue in my code and need assistance.

For some reason in the WSDL portType section I see the "Request" text being dropped off the end of this parameter value message="tns:createAssignment"/>

Also in the WSDL types section it's importing two different XSD's.  The first XSD looks like the onei want, the second one i don't want.

Also notice in the SOAP UI request/response, it's adding another wrapper in the request called <con:createAssignment> and in the response one called <return>.

I have had no luck in figuring out how to fix this, any help or code adjustments would be great!.

thanks

Sourcing.java



CreateAssignmentRequest.java


CreateAssignmentResponse.java



Glassfish WSDL that is being created



SOAP UI example
6 months ago
Hi,

I am new to JSF and was trying to find an example.

My question is in the processPage() method... how do i pass the managed bean to the ProjectDAO insert statement?

Faces-config.xml


XHTML Code


Managed Bean Code


Project DAO




thanks
4 years ago
JSF
Thanks for the reply.

i ended up reading a few more articles regarding SOAP Message Transmission Optimization Mechanism(MTOM) and just might have figured out how to do it in weblogic
The xml schema code looks something like this


thanks
5 years ago
Business client is requesting the web service response contain an excel file.

What is the xml datatype for excel?
Is this even possible?

Will be using weblogic 12c for project.

Sample
5 years ago
Trying to test a web service using the weblogic 12c Test Client page. I have an xml dateTime field called OccurredDtTm, weblogic says the format should be yyyy-MM-ddTHH:mm:ss.
So I tried 2013-07-16T08:02:04 and 2013-07-16 08:02:04, both threw incorrect date time error, (expected [YYYY-MM-DDTHH:MM:SS]) . Do I have to escape the T character or something?

thanks
5 years ago
I have an index page that uses a servlet called ApplServlet(gets a list of all applications) and forwards to the appl.jsp(displays all application names). Inside the appl.jsp, when I display the application names inside a form I allow the user to select buttons such as New (new applicaiton), View(view application details), Edit(edit details of the application), and Delete (delete application). All the buttons have name=actn. Once a button is selected it calls the same ApplServlet. I can see once the button is selected the value is passed in the url Appl?actn=New. The problem is when i try to read the URL variable using getParameter, it's always null.

First question, why is the parameter null?

Second question, is it okay for a servlet to forward to different JSP's? Ex. If actn=New, then forward to applNew.jsp, Else If actnView, then forward to applView.jsp, and so on.

thanks
5 years ago
the solution to this problem is in the Resync class

add this line of code above both get Methods for XMLGregorian Calendar fields

@XmlSchemaType(name = "dateTime")
public XMLGregorianCalendar getResyncStartDateTime().....


@XmlSchemaType(name = "dateTime")
public XMLGregorianCalendar getResyncEndDateTime()....
7 years ago
I am trying to marshal an object and it's throwing the following error.
class com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException [Ljava.lang.StackTraceElement;@c68c3 2 counts of IllegalAnnotationExceptions null.

The line thowing the error is this
JAXBContext context = JAXBContext.newInstance(Resync.class);


I have googled this error and some post say i need an empty constructor to fix this. I have tried several things and nothing seems to work. Any help is appreciated.

thanks

Main Class Snippet




Resync Class
7 years ago
I am trying to convert a string to Java Date.



java.text.ParseException: Unparseable date: "2008-04-22T09:00:10.548-06:00"

Any suggestions?
7 years ago
I am working on a program that sends a request to a url using standalone java. The code below works, but I don't want a bufferedReader object back, all i want to do is make the connection to the url and add "name=ryan&age=28" or whatever i may need to tail end of the URL. I know i could add the name and age logic to the url creation, but i would really like to find out how to use the DataOutputStream to do this.

Any help ? Thanks

9 years ago
i am fairly new to webservices, and we have a project coming up that is going to require us to use wsdl. I understand wsdl, xml schema, soap, java, and a few other pieces.

My main question is what is artix, and how does this fit into the other pieces that I have listed above. Any help would be appreciated.

thanks
10 years ago
select name from (select rank () over (partition by name order by rownum) seq, name from blow) order by seq, name
I have a class called Client, where I am making a call to another class called DB.

I am passing in a select statement to the DB class, the DB class takes care of the driver, login, connection, statement, result set, and closing work.

But I don't want the DB class to have to loop through the result, i want the client to do this.

So how exactly do i give them the data from the DB class and still maintain doing the closing work. Do i need to put the results set in a collection and return that back to the Client class, so I can still close everything i need in the DB class. I know i have to someone move the data from result set because once it closes it will be gone.

Any suggestions would be great?
Is it a good programming practice to call a method from within a constructor.

Or should you create the object first... Then come back and call the method on the object.
10 years ago
Whats going to replace StringTokenizer?
10 years ago