RaildoBarros / 4shared-api

Automatically exported from code.google.com/p/4shared-api
0 stars 0 forks source link

Using SOAP API from C# Console Application #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open Visual Studio .NET 2010 and create a new c# console application
2. Add web service reference named service1 with url 
https://api.4shared.com/jax3/DesktopApp?wsdl
3. In Main, add the following code :
            service1.DesktopAppJax2Client clt = new service1.DesktopAppJax2Client();
            service1.accountItem[] ai = clt.getAllFolders("USERNAME", "PASSWORD");

What is the expected output? What do you see instead?
A list of folders is expected in "ai".
Exception is thrown instead : 
L'exception System.InvalidOperationException n'a pas été gérée
  Message=Erreur reflétant 'arg2'.
  Source=System.Xml
  StackTrace:
       à System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
       à System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access)
       à System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel)
       à System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc)
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.XmlSerializerImporter.ImportMembersMapping(XmlName elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean isEncoded, String mappingKey)
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.OperationReflector.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, String mappingKey)
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.OperationReflector.LoadBodyMapping(MessageDescription message, String mappingKey, MessagePartDescriptionCollection& rpcEncodedTypedMessageBodyParts)
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.OperationReflector.CreateMessageInfo(MessageDescription message, String key)
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.OperationReflector.EnsureMessageInfos()
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.EnsureMessageInfos()
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.Reflector.OperationReflector.get_Request()
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.CreateFormatter()
       à System.ServiceModel.Description.XmlSerializerOperationBehavior.System.ServiceModel.Description.IOperationBehavior.ApplyClientBehavior(OperationDescription description, ClientOperation proxy)
       à System.ServiceModel.Description.DispatcherBuilder.BindOperations(ContractDescription contract, ClientRuntime proxy, DispatchRuntime dispatch)
       à System.ServiceModel.Description.DispatcherBuilder.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime clientRuntime)
       à System.ServiceModel.Description.DispatcherBuilder.BuildProxyBehavior(ServiceEndpoint serviceEndpoint, BindingParameterCollection& parameters)
       à System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint)
       à System.ServiceModel.ChannelFactory.CreateFactory()
       à System.ServiceModel.ChannelFactory.OnOpening()
       à System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       à System.ServiceModel.ChannelFactory.EnsureOpened()
       à System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
       à System.ServiceModel.ChannelFactory`1.CreateChannel()
       à System.ServiceModel.ClientBase`1.CreateChannel()
       à System.ServiceModel.ClientBase`1.CreateChannelInternal()
       à System.ServiceModel.ClientBase`1.get_Channel()
       à Net4Shared.service1.DesktopAppJax2Client.Net4Shared.service1.DesktopAppJax2.getAllFolders(getAllFoldersRequest request) dans C:\_DVA\SOFTWARES\4shared.api\Net4Shared\Net4Shared\Service References\service1\Reference.cs:ligne 3344
       à Net4Shared.service1.DesktopAppJax2Client.getAllFolders(String arg0, String arg1) dans C:\_DVA\SOFTWARES\4shared.api\Net4Shared\Net4Shared\Service References\service1\Reference.cs:ligne 3351
       à Net4Shared.Program.Main(String[] args) dans C:\_DVA\SOFTWARES\4shared.api\Net4Shared\Net4Shared\Program.cs:ligne 13
       à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.InvalidOperationException
       Message=L'élément XML appelé 'arg2' à partir de l'espace de noms '' fait référence à des types System.Nullable`1[System.Int64][] et System.Int64 distincts. Utilisez les attributs XML pour spécifier un autre nom ou espace de noms XML pour l'élément ou les types.
       Source=System.Xml
       StackTrace:
            à System.Xml.Serialization.XmlReflectionImporter.ReconcileAccessor(Accessor accessor, NameTable accessors)
            à System.Xml.Serialization.XmlReflectionImporter.ReconcileLocalAccessor(ElementAccessor accessor, String ns)
            à System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
            à System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
            à System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
       InnerException: 

What version of the product are you using? On what operating system?
Visual Studio .NET 2010 on Windows XP SP2

Please provide any additional information below.

Original issue reported on code.google.com by reunis...@gmail.com on 7 Feb 2012 at 6:08

GoogleCodeExporter commented 8 years ago
been a long time, and so far no response

Original comment by isaact...@gmail.com on 13 Dec 2012 at 5:31

GoogleCodeExporter commented 8 years ago
yes, no response, but I think 4shared api had to be improved when I did post 
this issue... anyway I don't need it anymore for now. If anyone got a solution, 
feel free to post it :)

Original comment by reunis...@gmail.com on 14 Dec 2012 at 6:30