use tcpmon[1] to look at the request and response. then check whether your response match with the WSDL file.
thanks, Amila. [1]http://ws.apache.org/commons/tcpmon/ 2008/3/28 Ken Ferguson <[EMAIL PROTECTED]>: > > That error is usually caused by you returning XML that doesn't match the > schema. With me it's almost always caused by a missing XML element where > one is required. > > HTH > > Ken > > > On 28/03/2008, Umut DOĞAN <[EMAIL PROTECTED]> wrote: > > > > Hello; > > Error is like that... > > > > - An error occured while creating stub! > > > > [ > > *java*] org.apache.axis2.AxisFault: * > > org.apache.axis2.databinding.ADBException*: Unexpected subelement > > timeCode > > > > [ > > *java*] at org.apache.axis2.AxisFault.makeFault(*AxisFault.java:417*) > > > > [ > > *java*] at com.cyangate.ffmpeg.client.FFmpegServiceStub.fromOM(* > > FFmpegServiceStub.java:621*) > > > > [ > > *java*] at > > com.cyangate.ffmpeg.client.FFmpegServiceStub.getVideoKeyframes(* > > FFmpegServiceStub.java:269*) > > > > [ > > *java*] at > > com.cyangate.ffmpeg.client.FFmpegServiceHandler.callGetVideoKeyFrames(* > > FFmpegServiceHandler.java:65*) > > > > [ > > *java*] at com.cyangate.ffmpeg.client.FFmpegClient.main(* > > FFmpegClient.java:266*) > > > > [ > > *java*] at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*) > > > > > > [ > > *java*] at sun.reflect.NativeMethodAccessorImpl.invoke(* > > NativeMethodAccessorImpl.java:39*) > > > > [ > > *java*] at sun.reflect.DelegatingMethodAccessorImpl.invoke(* > > DelegatingMethodAccessorImpl.java:25*) > > > > [ > > *java*] at java.lang.reflect.Method.invoke(*Method.java:597*) > > > > [ > > *java*] at org.apache.tools.ant.taskdefs.ExecuteJava.run(* > > ExecuteJava.java:217*) > > > > [ > > *java*] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(* > > ExecuteJava.java:152*) > > > > [ > > *java*] at org.apache.tools.ant.taskdefs.Java.run(*Java.java:747*) > > > > [ > > *java*] at org.apache.tools.ant.taskdefs.Java.executeJava(*Java.java:201 > > *) > > > > [ > > *java*] at org.apache.tools.ant.taskdefs.Java.execute(*Java.java:104*) > > > > [ > > *java*] at org.apache.tools.ant.UnknownElement.execute(* > > UnknownElement.java:288*) > > > > [ > > *java*] at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*) > > > > > > [ > > *java*] at sun.reflect.NativeMethodAccessorImpl.invoke(* > > NativeMethodAccessorImpl.java:39*) > > > > [ > > *java*] at sun.reflect.DelegatingMethodAccessorImpl.invoke(* > > DelegatingMethodAccessorImpl.java:25*) > > > > [ > > *java*] at java.lang.reflect.Method.invoke(*Method.java:597*) > > > > [ > > *java*] at org.apache.tools.ant.dispatch.DispatchUtils.execute(* > > DispatchUtils.java:105*) > > > > [ > > *java*] at org.apache.tools.ant.Task.perform(*Task.java:348*) > > > > [ > > *java*] at org.apache.tools.ant.Target.execute(*Target.java:357*) > > > > [ > > *java*] at org.apache.tools.ant.Target.performTasks(*Target.java:385*) > > > > [ > > *java*] at org.apache.tools.ant.Project.executeSortedTargets(* > > Project.java:1329*) > > > > [ > > *java*] at org.apache.tools.ant.Project.executeTarget(*Project.java:1298 > > *) > > > > [ > > *java*] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(* > > DefaultExecutor.java:41*) > > > > [ > > *java*] at > > org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets > > (*EclipseDefaultExecutor.java:32*) > > > > [ > > *java*] at org.apache.tools.ant.Project.executeTargets(*Project.java > > :1181*) > > > > [ > > *java*] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run( > > *InternalAntRunner.java:423*) > > > > [ > > *java*] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main > > (*InternalAntRunner.java:137*) > > > > [ > > *java*] Caused by: *java.lang.Exception*: * > > org.apache.axis2.databinding.ADBException*: Unexpected subelement > > timeCode > > > > [ > > *java*] at > > com.cyangate.ffmpeg.client.FFmpegServiceStub$GetVideoKeyframesResponse$Factory.parse > > (*FFmpegServiceStub.java:3716*) > > > > [ > > *java*] at com.cyangate.ffmpeg.client.FFmpegServiceStub.fromOM(* > > FFmpegServiceStub.java:608*) > > > > [ > > *java*] ... 28 more > > > > [ > > *java*] Caused by: *org.apache.axis2.databinding.ADBException*: > > Unexpected subelement timeCode > > > > [ > > *java*] at > > com.cyangate.ffmpeg.client.FFmpegServiceStub$GetVideoKeyframesResponse$Factory.parse > > (*FFmpegServiceStub.java:3712*) > > > > [ > > *java*] ... 29 more > > It gives error at here: > > > > KeyframeData[] keyframeOutput = > > ffmpegServiceHandler.callGetVideoKeyFrames( > > > > outputDir + File. > > *separator* + outputFileName, keyframeParameters, outputFrames); > > > > *_logger*.debug("Keyframe extraction completed."); > > > > > > > > KeyframeData class is here: > > * > > > > package > > * com.cyangate.ffmpeg.services; > > > > * > > > > public > > * *class* KeyframeData { > > > > *private* String timeCode; > > > > *private* *byte*[] imageData; > > > > *public* String getTimeCode() { > > > > *return* timeCode; > > > > } > > > > *public* *void* setTimeCode(String timeCode) { > > > > *this*.timeCode = timeCode; > > > > } > > > > *public* *byte*[] getImageData() { > > > > *return* imageData; > > > > } > > > > *public* *void* setImageData(*byte*[] imageData) { > > > > *this*.imageData = imageData; > > > > } > > > > } > > > > > > > > Ant returning value from* ServiceHandler calls by this way* > > > > FFmpegServiceStub stub = > > > > *new* FFmpegServiceStub(" > > http://localhost:8080/axis2/services/FFmpegService"); > > > > FFmpegServiceStub.GetVideoKeyframes request = > > *new* FFmpegServiceStub.GetVideoKeyframes(); > > > > > > > > request.setFileName(fileName); > > > > request.setParameters(parameters); > > > > request.setOutputFrames(outputFrames); > > > > FFmpegServiceStub.GetVideoKeyframesResponse response = > > stub.getVideoKeyframes(request); > > > > *_logger*.debug("Returned value from getVideoKeyframes is: " + > > > > response.get_return().toString()); > > > > returnedValue = response.get_return(); > > > > ** > > > > *Service code is here"* > > > > ** > > > > // Reading keyframes into buffers > > > > > > > > List<KeyframeData> keyframes = > > *new* ArrayList<KeyframeData>(); > > > > File dir = > > *new* File(outputFrames); > > > > Collection files = FileUtils.*listFiles*(dir.getParentFile(), > > *new* String[]{"jpg"}, *false*); > > > > Iterator i = files.iterator(); > > > > *while* (i.hasNext()) > > > > { > > > > File file = (File)i.next(); > > > > *try > > > > * > > > > { > > > > KeyframeData keyframe = > > *new* KeyframeData(); > > > > keyframe.setImageData(FileUtils.*readFileToByteArray*(file)); > > > > // starttime + (keyframenumber * time difference) > > > > > > > > // (000 + (5 * 0.1)) > > > > > > > > keyframe.setTimeCode( > > "00:01:10:56"); > > > > keyframes.add(keyframe); > > > > } > > > > *catch* (FileNotFoundException e) { > > > > *_logger*.error("File not found!", e); > > > > } > > > > *catch* (IOException e) { > > > > *_logger*.error("IO error occured!", e); > > > > } > > > > } > > > > *_logger*.debug("<< getVideoKeyframes()"); > > > > *return* (KeyframeData[]) (keyframes.toArray(*new* KeyframeData[ > > keyframes.size()])); > > > > > > > > Thanks a lot > > > > > > -- > > www.umutdogan.com > > > > -- Amila Suriarachchi, WSO2 Inc.
